| Index: base/strings/string_piece.h
|
| diff --git a/base/strings/string_piece.h b/base/strings/string_piece.h
|
| index c1af175406c23419f051232e3dcfc1f6f8d7fb83..eb82d336ff1005c1dc0f41d933a7192d7c37e853 100644
|
| --- a/base/strings/string_piece.h
|
| +++ b/base/strings/string_piece.h
|
| @@ -30,6 +30,7 @@
|
| #include "base/base_export.h"
|
| #include "base/basictypes.h"
|
| #include "base/containers/hash_tables.h"
|
| +#include "base/logging.h"
|
| #include "base/strings/string16.h"
|
|
|
| namespace base {
|
| @@ -143,7 +144,7 @@ BASE_EXPORT StringPiece16 substr(const StringPiece16& self,
|
| size_t pos,
|
| size_t n);
|
|
|
| -#if !defined(NDEBUG) || defined(DCHECK_ALWAYS_ON)
|
| +#if DCHECK_IS_ON()
|
| // Asserts that begin <= end to catch some errors with iterator usage.
|
| BASE_EXPORT void AssertIteratorsInOrder(std::string::const_iterator begin,
|
| std::string::const_iterator end);
|
| @@ -189,7 +190,7 @@ template <typename STRING_TYPE> class BasicStringPiece {
|
| : ptr_(offset), length_(len) {}
|
| BasicStringPiece(const typename STRING_TYPE::const_iterator& begin,
|
| const typename STRING_TYPE::const_iterator& end) {
|
| -#if !defined(NDEBUG) || defined(DCHECK_ALWAYS_ON)
|
| +#if DCHECK_IS_ON()
|
| // This assertion is done out-of-line to avoid bringing in logging.h and
|
| // instantiating logging macros for every instantiation.
|
| internal::AssertIteratorsInOrder(begin, end);
|
|
|