File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed
Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -55,7 +55,7 @@ namespace plateau::network {
5555 DatasetFiles getFiles (const std::string& id) const ;
5656 std::string download (const std::string& destination_directory_path, const std::string& url) const ;
5757
58- static std::string getDefaultServerUrl ();
58+ static const std::string& getDefaultServerUrl ();
5959
6060 private:
6161 std::string server_url_;
Original file line number Diff line number Diff line change @@ -100,7 +100,7 @@ namespace plateau::network {
100100
101101 // '\\' を '/' に置換
102102 auto pos = url_str.find (u8 ' \\ ' );
103- while (pos != std::string::npos){
103+ while (pos != std::string::npos) {
104104 url_str.replace (pos, 1 , u8" /" );
105105 pos = url_str.find (u8 ' \\ ' , pos + 1 );
106106 }
@@ -123,7 +123,8 @@ namespace plateau::network {
123123 return gml_file_path.u8string ();
124124 }
125125
126- std::string Client::getDefaultServerUrl () {
127- return " https://plateau-api-mock-v2.deta.dev" ;
126+ const std::string& Client::getDefaultServerUrl () {
127+ static const std::string default_server_url = " https://plateau-api-mock-v2.deta.dev" ;
128+ return default_server_url;
128129 }
129130}
You can’t perform that action at this time.
0 commit comments