Permalink
Browse files

Make error message from DISALLOW_COPY_AND_ASSIGN and DISALLOW_IMPLICI…

…T_CONSTRUCTORS easier to read

Now that lots of C++11 features are available in Mozc build, we can use 'Deleted Functions' to implement DISALLOW_COPY_AND_ASSIGN and DISALLOW_IMPLICIT_CONSTRUCTORS so that error messages can be easier to read.

Note that this is just a code cleanup thanks to C++11.  No behavior change is intended.

BUG=none
TEST=none

git-svn-id: https://mozc.googlecode.com/svn/trunk@542 a6090854-d499-a067-5803-1114d4e51264
  • Loading branch information...
1 parent 51b1f78 commit 987b0e9166585f3420661d3f0025b96e2a420e43 @yukawa yukawa committed Feb 8, 2015
Showing with 6 additions and 6 deletions.
  1. +5 −5 src/base/port.h
  2. +1 −1 src/mozc_version_template.txt
View
@@ -98,12 +98,12 @@ static const int32 kint32max = (( int32) 0x7FFFFFFF);
static const int64 kint64min = (( int64) GG_LONGLONG(0x8000000000000000));
static const int64 kint64max = (( int64) GG_LONGLONG(0x7FFFFFFFFFFFFFFF));
-#define DISALLOW_COPY_AND_ASSIGN(TypeName) \
- TypeName(const TypeName&); \
- void operator=(const TypeName&)
+#define DISALLOW_COPY_AND_ASSIGN(TypeName) \
+ TypeName(const TypeName&) = delete; \
+ void operator=(const TypeName&) = delete
-#define DISALLOW_IMPLICIT_CONSTRUCTORS(TypeName) \
- TypeName(); \
+#define DISALLOW_IMPLICIT_CONSTRUCTORS(TypeName) \
+ TypeName() = delete; \
DISALLOW_COPY_AND_ASSIGN(TypeName)
// Macro for annotating implicit fall-through
@@ -1,6 +1,6 @@
MAJOR=2
MINOR=16
-BUILD=2058
+BUILD=2059
REVISION=102
# NACL_DICTIONARY_VERSION is the target version of the system dictionary to be
# downloaded by NaCl Mozc.

0 comments on commit 987b0e9

Please sign in to comment.