From e2ac58a0d22d35038cd28d371c260babbefff004 Mon Sep 17 00:00:00 2001 From: olafvdspek Date: Sun, 15 Feb 2015 00:45:50 +0000 Subject: [PATCH] Remove _START_GOOGLE_NAMESPACE_ --- src/base/arena-inl.h | 5 ++--- src/base/arena.cc | 2 +- src/base/arena.h | 2 +- src/base/fileutil.h | 2 +- src/base/manual_constructor.h | 3 ++- src/base/mutex.h | 2 +- src/base/small_map.h | 3 ++- src/indented_writer.h | 2 +- src/per_expand_data.cc | 2 +- src/template.cc | 2 +- src/template_annotator.cc | 2 +- src/template_cache.cc | 2 +- src/template_dictionary.cc | 2 +- src/template_modifiers.cc | 2 +- src/template_modifiers_internal.h | 3 +-- src/template_namelist.cc | 2 +- src/template_pathops.cc | 2 +- src/template_string.cc | 2 +- src/tests/template_test_util.cc | 2 +- src/tests/template_test_util.h | 2 +- src/windows/port.cc | 2 +- src/windows/port.h | 2 +- 22 files changed, 25 insertions(+), 25 deletions(-) diff --git a/src/base/arena-inl.h b/src/base/arena-inl.h index d3f0d22..d4aee74 100644 --- a/src/base/arena-inl.h +++ b/src/base/arena-inl.h @@ -66,9 +66,8 @@ #include #include #include -_START_GOOGLE_NAMESPACE_ - +namespace ctemplate { // T is the type we want to allocate, and C is the type of the arena. // ArenaAllocator has the thread-safety characteristics of C. @@ -161,7 +160,7 @@ inline void* operator new[](size_t size, return arena->Alloc(size); } -_START_GOOGLE_NAMESPACE_ +namespace ctemplate { // Ordinarily in C++, one allocates all instances of a class from an // arena. If that's what you want to do, you don't need Gladiator. diff --git a/src/base/arena.cc b/src/base/arena.cc index 950c04d..62df770 100644 --- a/src/base/arena.cc +++ b/src/base/arena.cc @@ -70,7 +70,7 @@ static void* aligned_malloc(size_t size, size_t alignment) { // The value here doesn't matter until page_aligned_ is supported. static const int kPageSize = 8192; // should be getpagesize() -_START_GOOGLE_NAMESPACE_ +namespace ctemplate { // We used to only keep track of how much space has been allocated in // debug mode. Now we track this for optimized builds, as well. If you diff --git a/src/base/arena.h b/src/base/arena.h index 89edb51..049a6b5 100644 --- a/src/base/arena.h +++ b/src/base/arena.h @@ -279,7 +279,7 @@ #include "base/macros.h" // for uint32 #include "base/util.h" // for CHECK, etc -_START_GOOGLE_NAMESPACE_ +namespace ctemplate { // Annoying stuff for windows -- make sure clients (in this case // unittests) can import the class definitions and variables. diff --git a/src/base/fileutil.h b/src/base/fileutil.h index 7d169fb..4a207bb 100644 --- a/src/base/fileutil.h +++ b/src/base/fileutil.h @@ -44,7 +44,7 @@ #endif #include -_START_GOOGLE_NAMESPACE_ +namespace ctemplate { class FileStat { public: diff --git a/src/base/manual_constructor.h b/src/base/manual_constructor.h index e913983..a5d430c 100644 --- a/src/base/manual_constructor.h +++ b/src/base/manual_constructor.h @@ -45,7 +45,8 @@ #define UTIL_GTL_MANUAL_CONSTRUCTOR_H_ #include -_START_GOOGLE_NAMESPACE_ + +namespace ctemplate { namespace util { namespace gtl { diff --git a/src/base/mutex.h b/src/base/mutex.h index 7469bb1..3962a6d 100644 --- a/src/base/mutex.h +++ b/src/base/mutex.h @@ -158,7 +158,7 @@ #include #include // for abort() -_START_GOOGLE_NAMESPACE_ +namespace ctemplate { namespace base { // This is used for the single-arg constructor diff --git a/src/base/small_map.h b/src/base/small_map.h index 50c16d5..3e17d71 100644 --- a/src/base/small_map.h +++ b/src/base/small_map.h @@ -52,7 +52,8 @@ #include #include // for make_pair() #include "base/manual_constructor.h" -_START_GOOGLE_NAMESPACE_ + +namespace ctemplate { template struct CompileAssert { }; #define COMPILE_ASSERT(expr, msg) \ diff --git a/src/indented_writer.h b/src/indented_writer.h index 672ec55..6df190e 100644 --- a/src/indented_writer.h +++ b/src/indented_writer.h @@ -36,7 +36,7 @@ #include #include -_START_GOOGLE_NAMESPACE_ +namespace ctemplate { using std::string; diff --git a/src/per_expand_data.cc b/src/per_expand_data.cc index bfe2007..0a468cf 100644 --- a/src/per_expand_data.cc +++ b/src/per_expand_data.cc @@ -38,7 +38,7 @@ #include #include -_START_GOOGLE_NAMESPACE_ +namespace ctemplate { using std::string; diff --git a/src/template.cc b/src/template.cc index e9d6ede..ff54699 100644 --- a/src/template.cc +++ b/src/template.cc @@ -114,7 +114,7 @@ using HASH_NAMESPACE::unordered_map; using HASH_NAMESPACE::hash_map; #endif -_START_GOOGLE_NAMESPACE_ +namespace ctemplate { using HTMLPARSER_NAMESPACE::HtmlParser; diff --git a/src/template_annotator.cc b/src/template_annotator.cc index 318b0fa..57d5a2b 100644 --- a/src/template_annotator.cc +++ b/src/template_annotator.cc @@ -49,7 +49,7 @@ (emitter)->Emit(value); \ (emitter)->Emit("}}", 2); -_START_GOOGLE_NAMESPACE_ +namespace ctemplate { using std::string; diff --git a/src/template_cache.cc b/src/template_cache.cc index db652e7..819a0b6 100644 --- a/src/template_cache.cc +++ b/src/template_cache.cc @@ -78,7 +78,7 @@ static int kVerbosity = 0; // you can change this by hand to get vlogs #define PLOG(level) std::cerr << #level ": [" << strerror(errno) << "] " #define VLOG(level) if (kVerbosity >= level) std::cerr << "V" #level ": " -_START_GOOGLE_NAMESPACE_ +namespace ctemplate { // ---------------------------------------------------------------------- // TemplateCache::RefcountedTemplate diff --git a/src/template_dictionary.cc b/src/template_dictionary.cc index 05a8889..14e45a3 100644 --- a/src/template_dictionary.cc +++ b/src/template_dictionary.cc @@ -60,7 +60,7 @@ using std::map; using std::pair; using std::make_pair; -_START_GOOGLE_NAMESPACE_ +namespace ctemplate { // Guards the initialization of the global dictionary. static GoogleOnceType g_once = GOOGLE_ONCE_INIT; diff --git a/src/template_modifiers.cc b/src/template_modifiers.cc index e092955..5151376 100644 --- a/src/template_modifiers.cc +++ b/src/template_modifiers.cc @@ -82,7 +82,7 @@ bool HasInsecureProtocol(const char* in, int inlen) { } } // namespace URL -_START_GOOGLE_NAMESPACE_ +namespace ctemplate { using HTMLPARSER_NAMESPACE::HtmlParser; diff --git a/src/template_modifiers_internal.h b/src/template_modifiers_internal.h index fdfd56e..504edf3 100644 --- a/src/template_modifiers_internal.h +++ b/src/template_modifiers_internal.h @@ -65,12 +65,11 @@ using std::string; using std::vector; - namespace HTMLPARSER_NAMESPACE { class HtmlParser; } -_START_GOOGLE_NAMESPACE_ +namespace ctemplate { class TemplateModifier; diff --git a/src/template_namelist.cc b/src/template_namelist.cc index f1ec37c..c834120 100644 --- a/src/template_namelist.cc +++ b/src/template_namelist.cc @@ -54,7 +54,7 @@ using std::vector; #define LOG(level) std::cerr << #level << ": " -_START_GOOGLE_NAMESPACE_ +namespace ctemplate { TemplateNamelist::NameListType *TemplateNamelist::namelist_ = NULL; TemplateNamelist::MissingListType *TemplateNamelist::missing_list_ = NULL; diff --git a/src/template_pathops.cc b/src/template_pathops.cc index dce8d94..177d730 100644 --- a/src/template_pathops.cc +++ b/src/template_pathops.cc @@ -48,7 +48,7 @@ # endif #endif -_START_GOOGLE_NAMESPACE_ +namespace ctemplate { using std::string; diff --git a/src/template_string.cc b/src/template_string.cc index f0b16e1..a77d37f 100644 --- a/src/template_string.cc +++ b/src/template_string.cc @@ -50,7 +50,7 @@ using HASH_NAMESPACE::unordered_set; using HASH_NAMESPACE::hash_set; #endif -_START_GOOGLE_NAMESPACE_ +namespace ctemplate { // Based on public domain MurmurHashUnaligned2, by Austin Appleby. // http://murmurhash.googlepages.com/ diff --git a/src/tests/template_test_util.cc b/src/tests/template_test_util.cc index 595227c..57f7f91 100644 --- a/src/tests/template_test_util.cc +++ b/src/tests/template_test_util.cc @@ -82,7 +82,7 @@ using std::vector; } \ } while (0) -_START_GOOGLE_NAMESPACE_ +namespace ctemplate { // Deletes all files named *template* in dir, and sets up dir as the // place where StringToTemplate writes. diff --git a/src/tests/template_test_util.h b/src/tests/template_test_util.h index 0f11b29..ec3cc84 100644 --- a/src/tests/template_test_util.h +++ b/src/tests/template_test_util.h @@ -52,7 +52,7 @@ #include #include // for TemplateString, TemplateId -_START_GOOGLE_NAMESPACE_ +namespace ctemplate { using std::string; diff --git a/src/windows/port.cc b/src/windows/port.cc index 151ff14..73bb580 100644 --- a/src/windows/port.cc +++ b/src/windows/port.cc @@ -68,7 +68,7 @@ int snprintf(char *str, size_t size, const char *format, ...) { using std::string; using std::vector; -_START_GOOGLE_NAMESPACE_ +namespace ctemplate { // defined (for unix) in template_test_utils.cc string TmpFile(const char* basename) { diff --git a/src/windows/port.h b/src/windows/port.h index 1860e61..7edc6f0 100644 --- a/src/windows/port.h +++ b/src/windows/port.h @@ -122,7 +122,7 @@ extern int CTEMPLATE_DLL_DECL safe_vsnprintf(char *str, size_t size, #include #include -_START_GOOGLE_NAMESPACE_ +namespace ctemplate { extern CTEMPLATE_DLL_DECL std::string TmpFile(const char* basename); void CTEMPLATE_DLL_DECL CreateOrCleanTestDir(const std::string& dirname); }