From 4b381b72c94f37b7e452697e5fea3bd11226dc8c Mon Sep 17 00:00:00 2001 From: BLM Date: Tue, 21 Jul 2015 12:36:40 -0500 Subject: [PATCH] Adjusted comments --- pg_libphonenumber.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pg_libphonenumber.cpp b/pg_libphonenumber.cpp index e648fdc..ea8dc72 100755 --- a/pg_libphonenumber.cpp +++ b/pg_libphonenumber.cpp @@ -71,7 +71,6 @@ ShortPhoneNumber* parsePhoneNumber(const char* number_str, const char* country) ShortPhoneNumber* short_number; short_number = (ShortPhoneNumber*)palloc0(sizeof(ShortPhoneNumber)); - //TODO: can this be removed? (palloc normally handles this, right?) if(short_number == nullptr) { throw std::bad_alloc(); } @@ -79,6 +78,7 @@ ShortPhoneNumber* parsePhoneNumber(const char* number_str, const char* country) PhoneNumberUtil::ErrorType error; error = phoneUtil->Parse(number_str, country, &number); if(error == PhoneNumberUtil::NO_PARSING_ERROR) { + //Initialize short_number using placement new. new(short_number) ShortPhoneNumber(number); return short_number; } else {