Permalink
Browse files

use const std::string& ; pi 14 sec

  • Loading branch information...
herumi committed Jul 1, 2018
1 parent 293c7d7 commit f1de737a2aa38a411ed08b96bc9d84639d86b190
Showing with 2 additions and 2 deletions.
  1. +2 −2 raw/get_result_with_log.cpp
@@ -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);
@@ -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);
}

0 comments on commit f1de737

Please sign in to comment.