Fix bug/warning about temporary object lifetime (#4374)
This commit is contained in:
parent
6d2a358ff3
commit
87e7d4d784
1 changed files with 2 additions and 1 deletions
|
@ -64,7 +64,8 @@ std::shared_ptr<flatbuffers::Parser> nano::ipc::flatbuffers_handler::make_flatbu
|
|||
throw nano::error ("Internal IPC error: unable to find api path");
|
||||
}
|
||||
|
||||
char const * include_directories[] = { api_path->string ().c_str (), nullptr };
|
||||
const std::string api_path_str = api_path->string ();
|
||||
char const * include_directories[] = { api_path_str.c_str (), nullptr };
|
||||
std::string schemafile;
|
||||
if (!flatbuffers::LoadFile ((*api_path / "nanoapi.fbs").string ().c_str (), false, &schemafile))
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue