mirror of
https://github.com/asdlokj1qpi233/subconverter.git
synced 2026-11-03 02:02:24 +00:00
Enhancements
Fix support for Android Termux configuration. Fix support for OpenWRT SDK compilation. Optimize codes.
This commit is contained in:
2 files changed
+6
-2
No files matched your search
+5
-1
@@ -642,11 +642,15 @@ public:
|
||||
|
||||
int RenameSection(std::string oldName, std::string newName)
|
||||
{
|
||||
if(!SectionExist(oldName))
|
||||
if(!SectionExist(oldName) || SectionExist(newName))
|
||||
return -1;
|
||||
/*
|
||||
auto nodeHandler = ini_content.extract(oldName);
|
||||
nodeHandler.key() = newName;
|
||||
ini_content.insert(std::move(nodeHandler));
|
||||
*/
|
||||
ini_content[newName] = std::move(ini_content[oldName]);
|
||||
ini_content.erase(oldName);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user