Skip to content

Commit

Permalink
fix: name space
Browse files Browse the repository at this point in the history
  • Loading branch information
vansangpfiev committed May 14, 2024
1 parent 78f7662 commit d091472
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions cortex-cpp/controllers/server.cc
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,8 @@ void server::LoadModel(const HttpRequestPtr& req,
std::string abs_path = cortex_utils::GetCurrentPath() +
get_engine_path(cur_engine_name_);
dylib_ =
std::make_unique<dylib>(abs_path, "engine");
} catch (const dylib::load_error& e) {
std::make_unique<cortex_cpp::dylib>(abs_path, "engine");
} catch (const cortex_cpp::dylib::load_error& e) {
LOG_ERROR << "Could not load engine: " << e.what();
dylib_.reset();
engine_ = nullptr;
Expand Down
2 changes: 1 addition & 1 deletion cortex-cpp/controllers/server.h
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ class server : public drogon::HttpController<server>,
};

private:
std::unique_ptr<dylib> dylib_;
std::unique_ptr<cortex_cpp::dylib> dylib_;
EngineI* engine_;
std::string cur_engine_name_;
};
Expand Down
2 changes: 2 additions & 0 deletions cortex-cpp/utils/dylib.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
* The `dylib` class represents a single dynamic library instance,
* allowing the access of symbols like functions or global variables
*/
namespace cortex_cpp {
class dylib {
public:
struct filename_components {
Expand Down Expand Up @@ -311,6 +312,7 @@ class dylib {
}
};

}
#undef DYLIB_WIN_MAC_OTHER
#undef DYLIB_WIN_OTHER
#undef DYLIB_CPP17

0 comments on commit d091472

Please sign in to comment.