sign_cast to avoid char-to-uint warning

This commit is contained in:
Danny Robson 2012-06-13 15:45:33 +10:00
parent de89dabf4b
commit befb6f4b2b

View File

@ -20,6 +20,8 @@
#include "ip.hpp"
#include "types/casts.hpp"
#include <stdexcept>
#include <iostream>
@ -84,7 +86,7 @@ ipv4::ip::operator == (const ipv4::ip &rhs) const {
__octet = 0;
for (auto i = octetstart; i < octetend; ++i)
__octet = __octet * 10 + *i - '0';
__octet = __octet * 10u + sign_cast<unsigned> (*i - '0');
};
ipv4 := (octet %{ __octets[0] = __octet; } '.'