mirror of https://gitee.com/bigwinds/arangodb
re-added ConstructionGuard
This commit is contained in:
parent
fa26d8ca6c
commit
a2a14652b2
|
@ -75,10 +75,10 @@ std::unique_ptr<ViewImplementation> LoggerView::creator(
|
|||
LogicalView* view, arangodb::velocypack::Slice const& info) {
|
||||
LOG_TOPIC(INFO, Logger::FIXME) << "called LoggerView::creator";
|
||||
|
||||
return std::make_unique<LoggerView>(view, info);
|
||||
return std::make_unique<LoggerView>(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");
|
||||
|
|
|
@ -42,8 +42,15 @@ class LoggerView final : public ViewImplementation {
|
|||
static std::unique_ptr<ViewImplementation> 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;
|
||||
|
||||
|
|
Loading…
Reference in New Issue