diff options
author | Alexander Lantsev <aunsane@gmail.com> | 2015-02-01 09:25:45 +0000 |
---|---|---|
committer | Alexander Lantsev <aunsane@gmail.com> | 2015-02-01 09:25:45 +0000 |
commit | ace37acd4bd624593f97e8ed66383d9eb11e2d32 (patch) | |
tree | efa3be555a02a7e912a8cc9ac867e0c4a3feff03 /protocols/Tox/src/tox_address.h | |
parent | 09fa77d73829e76123ac7a9b73bc90def12e9d9c (diff) |
Tox: removed needless code
git-svn-id: http://svn.miranda-ng.org/main/trunk@11971 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Tox/src/tox_address.h')
-rw-r--r-- | protocols/Tox/src/tox_address.h | 61 |
1 files changed, 0 insertions, 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 |