Skip to content

Commit

Permalink
Make error message from DISALLOW_COPY_AND_ASSIGN and DISALLOW_IMPLICI…
Browse files Browse the repository at this point in the history
…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
yukawa committed Feb 8, 2015
1 parent 51b1f78 commit 987b0e9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions src/base/port.h
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/mozc_version_template.txt
@@ -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.
Expand Down

0 comments on commit 987b0e9

Please sign in to comment.