Skip to content

Commit

Permalink
Fix Endpoint::info declaration.
Browse files Browse the repository at this point in the history
  • Loading branch information
lganzzzo committed Sep 3, 2019
1 parent 02a42a3 commit 213fc52
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/oatpp/web/server/api/Endpoint.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ std::shared_ptr<Endpoint> Endpoint::createShared(const std::shared_ptr<RequestHa
return std::make_shared<Endpoint>(handler, infoBuilder);
}

std::shared_ptr<Endpoint::Info> Endpoint::info() {
std::shared_ptr<Endpoint::Info> Endpoint::info() const {
if (m_info == nullptr) {
m_info = m_infoBuilder();
}
Expand Down
6 changes: 3 additions & 3 deletions src/oatpp/web/server/api/Endpoint.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -169,10 +169,10 @@ class Endpoint : public oatpp::base::Countable {

const std::shared_ptr<RequestHandler> handler;

std::shared_ptr<Info> info();
std::shared_ptr<Info> info() const;

private:
std::shared_ptr<Info> m_info;
private:
mutable std::shared_ptr<Info> m_info;
const std::function<const std::shared_ptr<Endpoint::Info>&()> m_infoBuilder;

};
Expand Down

0 comments on commit 213fc52

Please sign in to comment.