Merge pull request #57 from google/rename_macro
Rename macros.
diff --git a/Changelog b/Changelog
index 37ab0a2..33add66 100644
--- a/Changelog
+++ b/Changelog
@@ -1,3 +1,9 @@
+2017-12-06:
+ Renamed `DISALLOW_COPY_AND_ASSIGN` and `DISALLOW_IMPLICIT_CONSTRUCTORS`
+ macros to `DC_DISALLOW_COPY_AND_ASSIGN` and
+ `DC_DISALLOW_IMPLICIT_CONSTRUCTORS` to make it easier to integrate the
+ library with other libraries that have similar macros.
+
2017-08-05:
Tagged v3.0.0.
Due to the directory rename switching to a new version number.
diff --git a/double-conversion/bignum.h b/double-conversion/bignum.h
index 4ff34e2..238a351 100644
--- a/double-conversion/bignum.h
+++ b/double-conversion/bignum.h
@@ -136,7 +136,7 @@
// The Bignum's value equals value(bigits_) * 2^(exponent_ * kBigitSize).
int exponent_;
- DISALLOW_COPY_AND_ASSIGN(Bignum);
+ DC_DISALLOW_COPY_AND_ASSIGN(Bignum);
};
} // namespace double_conversion
diff --git a/double-conversion/double-conversion.h b/double-conversion/double-conversion.h
index 6e3a79b..9978bde 100644
--- a/double-conversion/double-conversion.h
+++ b/double-conversion/double-conversion.h
@@ -374,7 +374,7 @@
const int max_leading_padding_zeroes_in_precision_mode_;
const int max_trailing_padding_zeroes_in_precision_mode_;
- DISALLOW_IMPLICIT_CONSTRUCTORS(DoubleToStringConverter);
+ DC_DISALLOW_IMPLICIT_CONSTRUCTORS(DoubleToStringConverter);
};
@@ -538,7 +538,7 @@
bool read_as_double,
int* processed_characters_count) const;
- DISALLOW_IMPLICIT_CONSTRUCTORS(StringToDoubleConverter);
+ DC_DISALLOW_IMPLICIT_CONSTRUCTORS(StringToDoubleConverter);
};
} // namespace double_conversion
diff --git a/double-conversion/ieee.h b/double-conversion/ieee.h
index 1b705d2..baaeced 100644
--- a/double-conversion/ieee.h
+++ b/double-conversion/ieee.h
@@ -257,7 +257,7 @@
(biased_exponent << kPhysicalSignificandSize);
}
- DISALLOW_COPY_AND_ASSIGN(Double);
+ DC_DISALLOW_COPY_AND_ASSIGN(Double);
};
class Single {
@@ -394,7 +394,7 @@
const uint32_t d32_;
- DISALLOW_COPY_AND_ASSIGN(Single);
+ DC_DISALLOW_COPY_AND_ASSIGN(Single);
};
} // namespace double_conversion
diff --git a/double-conversion/utils.h b/double-conversion/utils.h
index 04af875..d2981ed 100644
--- a/double-conversion/utils.h
+++ b/double-conversion/utils.h
@@ -136,8 +136,8 @@
// A macro to disallow the evil copy constructor and operator= functions
// This should be used in the private: declarations for a class
-#ifndef DISALLOW_COPY_AND_ASSIGN
-#define DISALLOW_COPY_AND_ASSIGN(TypeName) \
+#ifndef DC_DISALLOW_COPY_AND_ASSIGN
+#define DC_DISALLOW_COPY_AND_ASSIGN(TypeName) \
TypeName(const TypeName&); \
void operator=(const TypeName&)
#endif
@@ -148,10 +148,10 @@
// This should be used in the private: declarations for a class
// that wants to prevent anyone from instantiating it. This is
// especially useful for classes containing only static methods.
-#ifndef DISALLOW_IMPLICIT_CONSTRUCTORS
-#define DISALLOW_IMPLICIT_CONSTRUCTORS(TypeName) \
+#ifndef DC_DISALLOW_IMPLICIT_CONSTRUCTORS
+#define DC_DISALLOW_IMPLICIT_CONSTRUCTORS(TypeName) \
TypeName(); \
- DISALLOW_COPY_AND_ASSIGN(TypeName)
+ DC_DISALLOW_COPY_AND_ASSIGN(TypeName)
#endif
namespace double_conversion {
@@ -293,7 +293,7 @@
bool is_finalized() const { return position_ < 0; }
- DISALLOW_IMPLICIT_CONSTRUCTORS(StringBuilder);
+ DC_DISALLOW_IMPLICIT_CONSTRUCTORS(StringBuilder);
};
// The type-based aliasing rule allows the compiler to assume that pointers of