summaryrefslogtreecommitdiffstats
path: root/src/extras
diff options
context:
space:
mode:
authorerorcun <erorcunerorcun@hotmail.com.tr>2021-01-23 14:04:19 +0100
committererorcun <erorcunerorcun@hotmail.com.tr>2021-01-23 14:04:19 +0100
commit45c2488e367dad03726df94cf885c5655d6e47ab (patch)
tree67c021812dbd10309f2e28d633566acfde2709d1 /src/extras
parentStore all settings in .INI (diff)
downloadre3-45c2488e367dad03726df94cf885c5655d6e47ab.tar
re3-45c2488e367dad03726df94cf885c5655d6e47ab.tar.gz
re3-45c2488e367dad03726df94cf885c5655d6e47ab.tar.bz2
re3-45c2488e367dad03726df94cf885c5655d6e47ab.tar.lz
re3-45c2488e367dad03726df94cf885c5655d6e47ab.tar.xz
re3-45c2488e367dad03726df94cf885c5655d6e47ab.tar.zst
re3-45c2488e367dad03726df94cf885c5655d6e47ab.zip
Diffstat (limited to 'src/extras')
-rw-r--r--src/extras/ini_parser.hpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/extras/ini_parser.hpp b/src/extras/ini_parser.hpp
index 8e88bc29..7bea024c 100644
--- a/src/extras/ini_parser.hpp
+++ b/src/extras/ini_parser.hpp
@@ -158,6 +158,25 @@ namespace linb
/* Too lazy to continue this container... If you need more methods, just add it */
+ // re3
+ void remove(const string_type& sect, const key_type& key)
+ {
+ auto it = this->find(sect);
+ if(it != this->end())
+ {
+ it->second.erase(key);
+ }
+ }
+
+ int category_size(const string_type& sect)
+ {
+ auto it = this->find(sect);
+ if(it != this->end())
+ {
+ return it->second.size();
+ }
+ return 0;
+ }
#if 1
bool read_file(const char_type* filename)