summaryrefslogtreecommitdiff
path: root/protocols/Tox/src/tox_address.h
diff options
context:
space:
mode:
authorAlexander Lantsev <aunsane@gmail.com>2015-02-18 19:24:48 +0000
committerAlexander Lantsev <aunsane@gmail.com>2015-02-18 19:24:48 +0000
commit40453965455818d568bf90224b828c3f72b2606d (patch)
tree896abd9c140e7ccce2302937788ef14027d0142f /protocols/Tox/src/tox_address.h
parenta8bb7b8d1f606b887c614d6200840fffb1bd48aa (diff)
Tox:
- code cleaning - removed unneeded dependencies - posible fix for disconnect git-svn-id: http://svn.miranda-ng.org/main/trunk@12183 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Tox/src/tox_address.h')
-rw-r--r--protocols/Tox/src/tox_address.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/protocols/Tox/src/tox_address.h b/protocols/Tox/src/tox_address.h
index a4b152427d..6eada63300 100644
--- a/protocols/Tox/src/tox_address.h
+++ b/protocols/Tox/src/tox_address.h
@@ -16,7 +16,7 @@ public:
{
this->ToxHexAddress::ToxHexAddress(bin.data(), bin.size());
}
- ToxHexAddress(const uint8_t *bin, int size = TOX_FRIEND_ADDRESS_SIZE)
+ ToxHexAddress(const uint8_t *bin, size_t size = TOX_FRIEND_ADDRESS_SIZE)
{
char *hex = (char*)mir_alloc(size * 2 + 1);
hexData = bin2hex(bin, size, hex);
@@ -46,7 +46,7 @@ private:
public:
ToxBinAddress(const ToxBinAddress &address) : binData(address.binData) { }
ToxBinAddress(const std::vector<uint8_t> &bin) : binData(bin) { }
- ToxBinAddress(const uint8_t *bin, int size = TOX_FRIEND_ADDRESS_SIZE) : binData(bin, bin + size) { }
+ ToxBinAddress(const uint8_t *bin, size_t size = TOX_FRIEND_ADDRESS_SIZE) : binData(bin, bin + size) { }
ToxBinAddress(const std::string &hex)
{
this->ToxBinAddress::ToxBinAddress(hex.c_str());
@@ -55,8 +55,8 @@ public:
{
char *endptr;
const char *pos = hex;
- int size = mir_strlen(hex) / 2;
- for (int i = 0; i < size; i++)
+ size_t size = mir_strlen(hex) / 2;
+ for (size_t i = 0; i < size; i++)
{
char buf[5] = { '0', 'x', pos[0], pos[1], 0 };
binData.push_back((uint8_t)strtol(buf, &endptr, 0));