From 8a6018a371e6734b6638b3e149964a53e441c2eb Mon Sep 17 00:00:00 2001 From: "jia.shao.peng" Date: Tue, 30 Aug 2011 13:35:41 +0000 Subject: [PATCH] Cpp: Move scoped_ptr.h to memory folder. Patch contributed by thestig. git-svn-id: http://libphonenumber.googlecode.com/svn/trunk@341 ee073f10-1060-11df-b6a4-87a95322a99c --- 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 0e90b02..0be3d68 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 f669d29..d9a08ec 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 c30c4d9..eb5dc82 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 2a5c869..8115fbb 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 7ab6621..96528bd 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 ab74fae..fd01de3 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 830596d..7d16b19 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 e9a206e..49f2f41 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" -- 2.7.4