mirror of
https://github.com/asdlokj1qpi233/subconverter.git
synced 2026-11-02 01:33:04 +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
@@ -2,7 +2,7 @@
|
|||||||
set -xe
|
set -xe
|
||||||
|
|
||||||
apt update
|
apt update
|
||||||
apt install git cmake clang
|
apt install git cmake clang pkg-config
|
||||||
apt install libevent libcurl openssl pcre
|
apt install libevent libcurl openssl pcre
|
||||||
|
|
||||||
git clone https://github.com/jbeder/yaml-cpp
|
git clone https://github.com/jbeder/yaml-cpp
|
||||||
|
|||||||
+5
-1
@@ -642,11 +642,15 @@ public:
|
|||||||
|
|
||||||
int RenameSection(std::string oldName, std::string newName)
|
int RenameSection(std::string oldName, std::string newName)
|
||||||
{
|
{
|
||||||
if(!SectionExist(oldName))
|
if(!SectionExist(oldName) || SectionExist(newName))
|
||||||
return -1;
|
return -1;
|
||||||
|
/*
|
||||||
auto nodeHandler = ini_content.extract(oldName);
|
auto nodeHandler = ini_content.extract(oldName);
|
||||||
nodeHandler.key() = newName;
|
nodeHandler.key() = newName;
|
||||||
ini_content.insert(std::move(nodeHandler));
|
ini_content.insert(std::move(nodeHandler));
|
||||||
|
*/
|
||||||
|
ini_content[newName] = std::move(ini_content[oldName]);
|
||||||
|
ini_content.erase(oldName);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user