File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -71,7 +71,7 @@ std::string HPath::filename(const std::string& filepath) {
7171 } else {
7272 pos1++;
7373 }
74- std::string file = filepath.substr (pos1, - 1 );
74+ std::string file = filepath.substr (pos1);
7575
7676 std::string::size_type pos2 = file.find_last_of (" ." );
7777 if (pos2 == std::string::npos) {
@@ -87,13 +87,13 @@ std::string HPath::suffixname(const std::string& filepath) {
8787 } else {
8888 pos1++;
8989 }
90- std::string file = filepath.substr (pos1, - 1 );
90+ std::string file = filepath.substr (pos1);
9191
9292 std::string::size_type pos2 = file.find_last_of (" ." );
9393 if (pos2 == std::string::npos) {
9494 return " " ;
9595 }
96- return file.substr (pos2+1 , - 1 );
96+ return file.substr (pos2+1 );
9797}
9898
9999std::string HPath::join (const std::string& dir, const std::string& filename) {
Original file line number Diff line number Diff line change @@ -287,32 +287,32 @@ int IniParser::SaveAs(const char* filepath) {
287287
288288std::list<std::string> IniParser::GetSections () {
289289 std::list<std::string> ret;
290- if (root_ == NULL ) return std::move ( ret) ;
290+ if (root_ == NULL ) return ret;
291291
292292 for (auto pNode : root_->children ) {
293293 if (pNode->type == IniNode::INI_NODE_TYPE_SECTION ) {
294294 ret.push_back (pNode->label );
295295 }
296296 }
297- return std::move ( ret) ;
297+ return ret;
298298}
299299
300300std::list<std::string> IniParser::GetKeys (const std::string& section) {
301301 std::list<std::string> ret;
302- if (root_ == NULL ) return std::move ( ret) ;
302+ if (root_ == NULL ) return ret;
303303
304304 IniNode* pSection = root_;
305305 if (section.length () != 0 ) {
306306 pSection = root_->Get (section, IniNode::INI_NODE_TYPE_SECTION );
307- if (pSection == NULL ) return std::move ( ret) ;
307+ if (pSection == NULL ) return ret;
308308 }
309309
310310 for (auto pNode : pSection->children ) {
311311 if (pNode->type == IniNode::INI_NODE_TYPE_KEY_VALUE ) {
312312 ret.push_back (pNode->label );
313313 }
314314 }
315- return std::move ( ret) ;
315+ return ret;
316316}
317317
318318std::string IniParser::GetValue (const std::string& key, const std::string& section) {
You can’t perform that action at this time.
0 commit comments