Skip to content

Commit

Permalink
use const std::string& ; pi 14 sec
Browse files Browse the repository at this point in the history
  • Loading branch information
herumi committed Jul 1, 2018
1 parent 293c7d7 commit f1de737
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions raw/get_result_with_log.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const string RESULT_SUFFIX = "-result";
const string ERROR_SUFFIX = "-error";
const string MAX_SUFFIX = "-max";

int find_place(string irrational_value, string time){
int find_place(const string& irrational_value, const string& time){

string::size_type position = irrational_value.find(time);

Expand All @@ -42,7 +42,7 @@ int find_place(string irrational_value, string time){
return position;
}

string get_digit_seq(string irrational_value, int current_pos){
string get_digit_seq(const string& irrational_value, int current_pos){
if(current_pos - HEAD_LENGTH > 0){
return irrational_value.substr(current_pos-HEAD_LENGTH, HEAD_LENGTH+TIME_LENGTH+TAIL_LENGTH);
}
Expand Down

0 comments on commit f1de737

Please sign in to comment.