From: JINMEI Tatuya Date: Mon, 12 Nov 2012 19:05:58 +0000 (-0800) Subject: [2372] hide specific state cleasse inside an unnamed namespace. X-Git-Tag: trac2487_base~1^2~21^2~4 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=9fb295c549978ba217384643beb60b25b52ff35a;p=thirdparty%2Fkea.git [2372] hide specific state cleasse inside an unnamed namespace. they don't have to be (actually they already aren't) visible outside this translation unit. --- diff --git a/src/lib/dns/master_lexer.cc b/src/lib/dns/master_lexer.cc index 06ec9f54f2..6087038d16 100644 --- a/src/lib/dns/master_lexer.cc +++ b/src/lib/dns/master_lexer.cc @@ -167,6 +167,7 @@ State::getParenCount(const MasterLexer& lexer) const { return (lexer.impl_->paren_count_); } +namespace { class CRLF : public State { public: CRLF() {} @@ -200,7 +201,6 @@ public: } }; -namespace { // We use a common instance of a each state in a singleton-like way to save // construction overhead. They are not singletons in its strict sense as // we don't prohibit direct construction of these objects. But that doesn't