Enhancements

Fix support for Android Termux configuration.
Fix support for OpenWRT SDK compilation.
Optimize codes.
This commit is contained in:
Tindy X committed 2019-12-27 12:48:09 +08:00
1 parent 6b633d9153
commit 0676f1f4e4
2 files changed
+6 -2

No files matched your search

+1 -1
View File
@@ -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
View File
@@ -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;
} }