Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CHORES] fix std error #2

Open
wants to merge 3 commits into
base: chores/use-cpp-17-and-ruby-2-7-x
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions ext/mini_phone/mini_phone.cc
Original file line number Diff line number Diff line change
Expand Up @@ -415,15 +415,15 @@ extern "C" VALUE rb_phone_number_area_code(VALUE self) {
TypedData_Get_Struct(self, PhoneNumberInfo, &phone_number_info_type, phone_number_info);

PhoneNumber *number = phone_number_info->phone_number;
string national_significant_number;
std::string national_significant_number;
phone_util.GetNationalSignificantNumber(*number, &national_significant_number);
string area_code;
string subscriber_number;
std::string area_code;
std::string subscriber_number;

int area_code_length = phone_util.GetLengthOfGeographicalAreaCode(*number);
if (area_code_length > 0) {
area_code = national_significant_number.substr(0, area_code_length);
subscriber_number = national_significant_number.substr(area_code_length, string::npos);
subscriber_number = national_significant_number.substr(area_code_length, std::string::npos);
} else {
area_code = "";
subscriber_number = national_significant_number;
Expand Down
2 changes: 1 addition & 1 deletion lib/mini_phone/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# frozen_string_literal: true

module MiniPhone
VERSION = '1.1.9'
VERSION = '1.1.10'
end