From 797a735db79cad1dc311890a7f72cc2aaeac84ac Mon Sep 17 00:00:00 2001 From: Thomas Jarosch Date: Mon, 11 Oct 2010 10:40:46 +0200 Subject: [PATCH] Remove redundant function --- src/util.cpp | 19 ++----------------- src/util.hpp | 3 +-- 2 files changed, 3 insertions(+), 19 deletions(-) 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 -- 1.7.1