From 015d6c13061f61dc9fabd7576859d6848abc53a0 Mon Sep 17 00:00:00 2001 From: Adrien Destugues Date: Sat, 19 Dec 2020 10:54:06 +0100 Subject: [PATCH] BMenuField: use anonymous namespace for internal class. As suggested by korli, this is indeed a better way to hide internal classes and make them completely unreachable from outside the cpp file they are defined in. --- src/kits/interface/MenuField.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/kits/interface/MenuField.cpp b/src/kits/interface/MenuField.cpp index 07c979c414..8bf6193010 100644 --- a/src/kits/interface/MenuField.cpp +++ b/src/kits/interface/MenuField.cpp @@ -163,7 +163,7 @@ struct BMenuField::LayoutData { // #pragma mark - MouseDownFilter -namespace BPrivate { +namespace { class MouseDownFilter : public BMessageFilter { @@ -1025,7 +1025,7 @@ BMenuField::InitObject(const char* label) fFixedSizeMB = false; fMenuTaskID = -1; fLayoutData = new LayoutData; - fMouseDownFilter = new BPrivate::MouseDownFilter(); + fMouseDownFilter = new MouseDownFilter(); SetLabel(label);