From 2f03208d02f05eaa37356e85bfec88f131a755f4 Mon Sep 17 00:00:00 2001 From: thestig Date: Tue, 30 Aug 2011 13:35:41 +0000 Subject: [PATCH] Cpp: Move scoped_ptr.h to memory folder. --- cpp/CMakeLists.txt | 12 +++++++----- cpp/src/base/{ => memory}/scoped_ptr.h | 6 +++--- cpp/src/phonenumbers/logger.h | 2 -- cpp/src/phonenumbers/phonenumberutil.h | 2 +- cpp/src/phonenumbers/regexp_adapter_icu.cc | 2 +- cpp/src/phonenumbers/regexp_cache.h | 2 +- cpp/test/phonenumbers/logger_test.cc | 1 + cpp/test/phonenumbers/regexp_adapter_test.cc | 2 +- 8 files changed, 15 insertions(+), 14 deletions(-) rename cpp/src/base/{ => memory}/scoped_ptr.h (81%) diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt index 0e90b02b6..0be3d6823 100644 --- a/cpp/CMakeLists.txt +++ b/cpp/CMakeLists.txt @@ -317,13 +317,15 @@ install (FILES DESTINATION include/phonenumbers/ ) +install (FILES src/base/basictypes.h + DESTINATION include/base/) + install (FILES - "src/base/basictypes.h" - "src/base/scoped_ptr.h" - DESTINATION include/base/ + "src/base/memory/scoped_ptr.h" + "src/base/memory/singleton.h" + DESTINATION include/base/memory/ ) -install (FILES src/base/memory/singleton.h - DESTINATION include/base/memory/) + install (FILES src/base/synchronization/lock.h DESTINATION include/base/synchronization/) diff --git a/cpp/src/base/scoped_ptr.h b/cpp/src/base/memory/scoped_ptr.h similarity index 81% rename from cpp/src/base/scoped_ptr.h rename to cpp/src/base/memory/scoped_ptr.h index f669d291b..d9a08ec70 100644 --- a/cpp/src/base/scoped_ptr.h +++ b/cpp/src/base/memory/scoped_ptr.h @@ -14,11 +14,11 @@ // Author: Philippe Liard -#ifndef I18N_PHONENUMBERS_BASE_SCOPED_PTR_H_ -#define I18N_PHONENUMBERS_BASE_SCOPED_PTR_H_ +#ifndef I18N_PHONENUMBERS_BASE_MEMORY_SCOPED_PTR_H_ +#define I18N_PHONENUMBERS_BASE_MEMORY_SCOPED_PTR_H_ #include using boost::scoped_ptr; -#endif // I18N_PHONENUMBERS_BASE_SCOPED_PTR_H_ +#endif // I18N_PHONENUMBERS_BASE_MEMORY_SCOPED_PTR_H_ diff --git a/cpp/src/phonenumbers/logger.h b/cpp/src/phonenumbers/logger.h index c30c4d96f..eb5dc82e8 100644 --- a/cpp/src/phonenumbers/logger.h +++ b/cpp/src/phonenumbers/logger.h @@ -20,8 +20,6 @@ #include #include -#include - namespace i18n { namespace phonenumbers { diff --git a/cpp/src/phonenumbers/phonenumberutil.h b/cpp/src/phonenumbers/phonenumberutil.h index 2a5c8699a..8115fbb90 100644 --- a/cpp/src/phonenumbers/phonenumberutil.h +++ b/cpp/src/phonenumbers/phonenumberutil.h @@ -28,8 +28,8 @@ #include #include "base/basictypes.h" +#include "base/memory/scoped_ptr.h" #include "base/memory/singleton.h" -#include "base/scoped_ptr.h" #include "phonenumbers/phonenumber.pb.h" class TelephoneNumber; diff --git a/cpp/src/phonenumbers/regexp_adapter_icu.cc b/cpp/src/phonenumbers/regexp_adapter_icu.cc index 7ab6621a2..96528bdb3 100644 --- a/cpp/src/phonenumbers/regexp_adapter_icu.cc +++ b/cpp/src/phonenumbers/regexp_adapter_icu.cc @@ -24,7 +24,7 @@ #include "base/basictypes.h" #include "base/logging.h" -#include "base/scoped_ptr.h" +#include "base/memory/scoped_ptr.h" #include "phonenumbers/default_logger.h" namespace i18n { diff --git a/cpp/src/phonenumbers/regexp_cache.h b/cpp/src/phonenumbers/regexp_cache.h index ab74fae40..fd01de363 100644 --- a/cpp/src/phonenumbers/regexp_cache.h +++ b/cpp/src/phonenumbers/regexp_cache.h @@ -31,7 +31,7 @@ #include #include "base/basictypes.h" -#include "base/scoped_ptr.h" +#include "base/memory/scoped_ptr.h" #include "base/synchronization/lock.h" #ifdef USE_TR1_UNORDERED_MAP diff --git a/cpp/test/phonenumbers/logger_test.cc b/cpp/test/phonenumbers/logger_test.cc index 830596d4f..7d16b19d7 100644 --- a/cpp/test/phonenumbers/logger_test.cc +++ b/cpp/test/phonenumbers/logger_test.cc @@ -18,6 +18,7 @@ #include +#include "base/memory/scoped_ptr.h" #include "phonenumbers/default_logger.h" namespace i18n { diff --git a/cpp/test/phonenumbers/regexp_adapter_test.cc b/cpp/test/phonenumbers/regexp_adapter_test.cc index e9a206e00..49f2f4176 100644 --- a/cpp/test/phonenumbers/regexp_adapter_test.cc +++ b/cpp/test/phonenumbers/regexp_adapter_test.cc @@ -23,7 +23,7 @@ #include #include "base/basictypes.h" -#include "base/scoped_ptr.h" +#include "base/memory/scoped_ptr.h" #include "phonenumbers/stl_util.h" #include "phonenumbers/stringutil.h"