diff --git a/arangod/Views/LoggerView.cpp b/arangod/Views/LoggerView.cpp index 046044bc25..192f661c45 100644 --- a/arangod/Views/LoggerView.cpp +++ b/arangod/Views/LoggerView.cpp @@ -75,10 +75,10 @@ std::unique_ptr LoggerView::creator( LogicalView* view, arangodb::velocypack::Slice const& info) { LOG_TOPIC(INFO, Logger::FIXME) << "called LoggerView::creator"; - return std::make_unique(view, info); + return std::make_unique(ConstructionGuard(), view, info); } -LoggerView::LoggerView(LogicalView* logical, +LoggerView::LoggerView(ConstructionGuard const&, LogicalView* logical, arangodb::velocypack::Slice const& info) : ViewImplementation(logical, info) { VPackSlice properties = info.get("properties"); diff --git a/arangod/Views/LoggerView.h b/arangod/Views/LoggerView.h index 45da4fbfcb..ead176979e 100644 --- a/arangod/Views/LoggerView.h +++ b/arangod/Views/LoggerView.h @@ -42,8 +42,15 @@ class LoggerView final : public ViewImplementation { static std::unique_ptr creator( LogicalView*, arangodb::velocypack::Slice const&); + private: + // private struct that does not do anything + // we require it in the constructor of LoggerView so we + // can ensure any constructor calls are coming from the + // LoggerView's creator method + struct ConstructionGuard {}; + public: - LoggerView(LogicalView* logical, + LoggerView(ConstructionGuard const&, LogicalView* logical, arangodb::velocypack::Slice const& info); ~LoggerView() = default;