From ca7b7940b50d48a6015a8759f74f459e33702472 Mon Sep 17 00:00:00 2001 From: Erik Zandvliet Date: Wed, 25 Sep 2013 11:39:33 +0200 Subject: [PATCH] Removed non-template encodeVector. --- lib/json.cpp | 15 --------------- lib/json.h | 2 -- 2 files changed, 17 deletions(-) diff --git a/lib/json.cpp b/lib/json.cpp index ab716a6b..928c410b 100644 --- a/lib/json.cpp +++ b/lib/json.cpp @@ -992,18 +992,3 @@ JSON::Value JSON::fromDTMI2(const unsigned char * data, unsigned int len, unsign tmp["trackid"] = tmpTrackID; return tmp; } - -std::string JSON::encodeVector(std::vector & toEncode){ - std::string result; - for(int i = 0; i < toEncode.size(); i++){ - long long int temp = toEncode[i]; - while( temp >= 0xFFFF){ - result += (char)0xFF; - result += (char)0xFF; - temp -= 0xFFFF; - } - result += (char)temp / 255; - result += (char)temp % 255; - } - return result; -} diff --git a/lib/json.h b/lib/json.h index 9c6d2010..fea93476 100644 --- a/lib/json.h +++ b/lib/json.h @@ -108,8 +108,6 @@ namespace JSON { Value fromString(std::string json); Value fromFile(std::string filename); - std::string encodeVector(std::vector & toEncode); - template std::string encodeVector(T begin, T end){ std::string result;