Browse Source

Clean compile with CMAKE_BUILD_TYPE=RELEASE

pull/572/head
David Hotham 11 years ago
parent
commit
ec51a79c6b
3 changed files with 7 additions and 0 deletions
  1. +2
    -0
      cpp/src/phonenumbers/asyoutypeformatter.cc
  2. +4
    -0
      cpp/src/phonenumbers/base/logging.h
  3. +1
    -0
      cpp/test/phonenumbers/geocoding/geocoding_test_program.cc

+ 2
- 0
cpp/src/phonenumbers/asyoutypeformatter.cc View File

@ -114,6 +114,7 @@ void MatchAllGroups(const string& pattern,
bool status = bool status =
cache->GetRegExp(new_pattern).Consume(consume_input.get(), group); cache->GetRegExp(new_pattern).Consume(consume_input.get(), group);
DCHECK(status); DCHECK(status);
IGNORE_UNUSED(status);
} }
PhoneMetadata CreateEmptyMetadata() { PhoneMetadata CreateEmptyMetadata() {
@ -507,6 +508,7 @@ void AsYouTypeFormatter::AttemptToFormatAccruedDigits(
bool status = regexp_cache_.GetRegExp(pattern).GlobalReplace( bool status = regexp_cache_.GetRegExp(pattern).GlobalReplace(
&formatted_number, number_format.format()); &formatted_number, number_format.format());
DCHECK(status); DCHECK(status);
IGNORE_UNUSED(status);
AppendNationalNumber(formatted_number, formatted_result); AppendNationalNumber(formatted_number, formatted_result);
return; return;


+ 4
- 0
cpp/src/phonenumbers/base/logging.h View File

@ -38,4 +38,8 @@ template <typename T> T* CHECK_NOTNULL(T* ptr) {
return ptr; return ptr;
} }
#if !defined(IGNORE_UNUSED)
#define IGNORE_UNUSED(X) (void)(X)
#endif
#endif // I18N_PHONENUMBERS_BASE_LOGGING_H_ #endif // I18N_PHONENUMBERS_BASE_LOGGING_H_

+ 1
- 0
cpp/test/phonenumbers/geocoding/geocoding_test_program.cc View File

@ -33,6 +33,7 @@ int main() {
const PhoneNumberUtil::ErrorType status = phone_util.Parse( const PhoneNumberUtil::ErrorType status = phone_util.Parse(
"16502530000", "US", &number); "16502530000", "US", &number);
CHECK_EQ(status, PhoneNumberUtil::NO_PARSING_ERROR); CHECK_EQ(status, PhoneNumberUtil::NO_PARSING_ERROR);
IGNORE_UNUSED(status);
const std::string description = const std::string description =
PhoneNumberOfflineGeocoder().GetDescriptionForNumber( PhoneNumberOfflineGeocoder().GetDescriptionForNumber(


Loading…
Cancel
Save