From ace37acd4bd624593f97e8ed66383d9eb11e2d32 Mon Sep 17 00:00:00 2001 From: Alexander Lantsev Date: Sun, 1 Feb 2015 09:25:45 +0000 Subject: Tox: removed needless code git-svn-id: http://svn.miranda-ng.org/main/trunk@11971 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/Tox/src/tox_address.h | 61 ----------------------------------------- 1 file changed, 61 deletions(-) diff --git a/protocols/Tox/src/tox_address.h b/protocols/Tox/src/tox_address.h index b8ceccefae..2bd0d82bbe 100644 --- a/protocols/Tox/src/tox_address.h +++ b/protocols/Tox/src/tox_address.h @@ -86,65 +86,4 @@ ToxBinAddress ToxHexAddress::ToBin() const return bin; } -/*class ToxAddress -{ -private: - std::string hexData; - - class ToxBytes - { - private: - uint8_t *bytes; - - public: - ToxBytes(uint8_t *bytes) : bytes(bytes) { } - ~ToxBytes() { if (bytes) mir_free(bytes); } - - operator const uint8_t*() { return bytes; } - }; - -public: - ToxAddress(const char *hex) : hexData(hex) { } - ToxAddress(const std::string &hex) : hexData(hex) { } - ToxAddress(const ToxAddress &address) : hexData(address.hexData) { } - ToxAddress(const uint8_t *bin, int size = TOX_FRIEND_ADDRESS_SIZE) - //: binData(bin, bin + size) - { - char *hex = (char*)mir_alloc(size * 2 + 1); - std::string hexData = bin2hex(bin, size, hex); - std::transform(hexData.begin(), hexData.end(), hexData.begin(), ::toupper); - //mir_free(hex); - } - - ~ToxAddress() - { - int i = 0; - } - - operator const char*() const - { - return hexData.c_str(); - } - - ToxBytes AsBytes() const - { - char *endptr; - const char *pos = hexData.c_str(); - int size = hexData.length() / 2; - uint8_t *result = (uint8_t*)mir_alloc(size); - for (int i = 0; i < size; i++) - { - char buf[5] = { '0', 'x', pos[0], pos[1], 0 }; - result[i] = (uint8_t)strtol(buf, &endptr, 0); - pos += 2; - } - return ToxBytes(result); - } - - std::string AsPubKey() const - { - return hexData.substr(0, TOX_PUBLIC_KEY_SIZE * 2).c_str(); - } -};*/ - #endif //_TOX_ADDRESS_H_ \ No newline at end of file -- cgit v1.2.3