File tree Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -71,7 +71,7 @@ std::string HPath::filename(const std::string& filepath) {
71
71
} else {
72
72
pos1++;
73
73
}
74
- std::string file = filepath.substr (pos1, - 1 );
74
+ std::string file = filepath.substr (pos1);
75
75
76
76
std::string::size_type pos2 = file.find_last_of (" ." );
77
77
if (pos2 == std::string::npos) {
@@ -87,13 +87,13 @@ std::string HPath::suffixname(const std::string& filepath) {
87
87
} else {
88
88
pos1++;
89
89
}
90
- std::string file = filepath.substr (pos1, - 1 );
90
+ std::string file = filepath.substr (pos1);
91
91
92
92
std::string::size_type pos2 = file.find_last_of (" ." );
93
93
if (pos2 == std::string::npos) {
94
94
return " " ;
95
95
}
96
- return file.substr (pos2+1 , - 1 );
96
+ return file.substr (pos2+1 );
97
97
}
98
98
99
99
std::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) {
287
287
288
288
std::list<std::string> IniParser::GetSections () {
289
289
std::list<std::string> ret;
290
- if (root_ == NULL ) return std::move ( ret) ;
290
+ if (root_ == NULL ) return ret;
291
291
292
292
for (auto pNode : root_->children ) {
293
293
if (pNode->type == IniNode::INI_NODE_TYPE_SECTION) {
294
294
ret.push_back (pNode->label );
295
295
}
296
296
}
297
- return std::move ( ret) ;
297
+ return ret;
298
298
}
299
299
300
300
std::list<std::string> IniParser::GetKeys (const std::string& section) {
301
301
std::list<std::string> ret;
302
- if (root_ == NULL ) return std::move ( ret) ;
302
+ if (root_ == NULL ) return ret;
303
303
304
304
IniNode* pSection = root_;
305
305
if (section.length () != 0 ) {
306
306
pSection = root_->Get (section, IniNode::INI_NODE_TYPE_SECTION);
307
- if (pSection == NULL ) return std::move ( ret) ;
307
+ if (pSection == NULL ) return ret;
308
308
}
309
309
310
310
for (auto pNode : pSection->children ) {
311
311
if (pNode->type == IniNode::INI_NODE_TYPE_KEY_VALUE) {
312
312
ret.push_back (pNode->label );
313
313
}
314
314
}
315
- return std::move ( ret) ;
315
+ return ret;
316
316
}
317
317
318
318
std::string IniParser::GetValue (const std::string& key, const std::string& section) {
You can’t perform that action at this time.
0 commit comments