From: Thomas Jarosch Date: Mon, 11 Oct 2010 08:40:46 +0000 (+0200) Subject: Remove redundant function X-Git-Tag: v1.1~69 X-Git-Url: http://developer.intra2net.com/git/?p=bpdyndnsd;a=commitdiff_plain;h=797a735db79cad1dc311890a7f72cc2aaeac84ac Remove redundant function --- diff --git a/src/util.cpp b/src/util.cpp index 3d5dd39..fe11814 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -101,24 +101,9 @@ std::string compute_md5_digest(std::string data) /** * Get the status code from the given data. - * @param data The data containing the status code at front, limited by " ". - * @return The parsed status code. - */ -std::string parse_status_code(std::string data) -{ - std::list tokens; - boost::algorithm::split(tokens,data,boost::is_any_of(" ")); - if ( tokens.empty() ) - return ""; - return tokens.front(); -} - - -/** - * Get the status code from the given data. - * @param data The data containing the status code at front, limited by " ". + * @param data The data containing the status code at front, limited by delimiter. * @param delimiter The delimiter to use. - * @return The parsed status code. + * @return The parsed status code */ std::string parse_status_code(std::string data, std::string delimiter) { diff --git a/src/util.hpp b/src/util.hpp index 5593ef2..3f886ea 100644 --- a/src/util.hpp +++ b/src/util.hpp @@ -18,8 +18,7 @@ namespace Util { std::string compute_md5_digest(std::string data); - std::string parse_status_code(std::string data); - std::string parse_status_code(std::string data, std::string delimiter); + std::string parse_status_code(std::string data, std::string delimiter=" "); } #endif