aboutsummaryrefslogtreecommitdiff
path: root/contrib/epee/include/tiny_ini.h
diff options
context:
space:
mode:
authormj-xmr <mjxmr@protonmail.com>2020-11-12 19:14:32 +0100
committermj-xmr <mjxmr@protonmail.com>2021-04-16 20:54:20 +0200
commitdc81e23e60f6539b5d273bd42024e765b6cdf2d5 (patch)
tree32229c8c475a3a3f73dec63cf36a57c00e768e39 /contrib/epee/include/tiny_ini.h
parentRevert "Merge pull request #7136" (diff)
downloadmonero-dc81e23e60f6539b5d273bd42024e765b6cdf2d5.tar.xz
Split epee/string_tools.h and encapsulate boost::lexical_cast
Diffstat (limited to '')
-rw-r--r--contrib/epee/include/tiny_ini.h18
1 files changed, 2 insertions, 16 deletions
diff --git a/contrib/epee/include/tiny_ini.h b/contrib/epee/include/tiny_ini.h
index 2bc71fc1a..6ced548eb 100644
--- a/contrib/epee/include/tiny_ini.h
+++ b/contrib/epee/include/tiny_ini.h
@@ -28,8 +28,6 @@
#ifndef _TINY_INI_H_
#define _TINY_INI_H_
-#include <boost/regex.hpp>
-#include <boost/lexical_cast.hpp>
#include "string_tools.h"
namespace epee
@@ -37,20 +35,8 @@ namespace epee
namespace tiny_ini
{
- inline
- bool get_param_value(const std::string& param_name, const std::string& ini_entry, std::string& res)
- {
- std::string expr_str = std::string() + "^("+ param_name +") *=(.*?)$";
- const boost::regex match_ini_entry( expr_str, boost::regex::icase | boost::regex::normal);
- boost::smatch result;
- if(!boost::regex_search(ini_entry, result, match_ini_entry, boost::match_default))
- return false;
- res = result[2];
- string_tools::trim(res);
- return true;
- }
- inline
- std::string get_param_value(const std::string& param_name, const std::string& ini_entry)
+ bool get_param_value(const std::string& param_name, const std::string& ini_entry, std::string& res);
+ inline std::string get_param_value(const std::string& param_name, const std::string& ini_entry)
{
std::string buff;
get_param_value(param_name, ini_entry, buff);