mirror of
https://github.com/pocoproject/poco.git
synced 2025-12-21 12:49:44 +01:00
Fixing NumericString#check function name conflict with check macro on macosx10.12. (#2096)
https://github.com/pocoproject/poco/issues/1451 https://github.com/pocoproject/poco/issues/1693
This commit is contained in:
committed by
Alex Fabijanic
parent
03daed2230
commit
6fa4fda1e4
@@ -195,39 +195,39 @@ namespace Impl {
|
|||||||
|
|
||||||
char*& operator ++ () // prefix
|
char*& operator ++ () // prefix
|
||||||
{
|
{
|
||||||
check(_cur + 1);
|
checkBounds(_cur + 1);
|
||||||
return ++_cur;
|
return ++_cur;
|
||||||
}
|
}
|
||||||
|
|
||||||
char* operator ++ (int) // postfix
|
char* operator ++ (int) // postfix
|
||||||
{
|
{
|
||||||
check(_cur + 1);
|
checkBounds(_cur + 1);
|
||||||
char* tmp = _cur++;
|
char* tmp = _cur++;
|
||||||
return tmp;
|
return tmp;
|
||||||
}
|
}
|
||||||
|
|
||||||
char*& operator -- () // prefix
|
char*& operator -- () // prefix
|
||||||
{
|
{
|
||||||
check(_cur - 1);
|
checkBounds(_cur - 1);
|
||||||
return --_cur;
|
return --_cur;
|
||||||
}
|
}
|
||||||
|
|
||||||
char* operator -- (int) // postfix
|
char* operator -- (int) // postfix
|
||||||
{
|
{
|
||||||
check(_cur - 1);
|
checkBounds(_cur - 1);
|
||||||
char* tmp = _cur--;
|
char* tmp = _cur--;
|
||||||
return tmp;
|
return tmp;
|
||||||
}
|
}
|
||||||
|
|
||||||
char*& operator += (int incr)
|
char*& operator += (int incr)
|
||||||
{
|
{
|
||||||
check(_cur + incr);
|
checkBounds(_cur + incr);
|
||||||
return _cur += incr;
|
return _cur += incr;
|
||||||
}
|
}
|
||||||
|
|
||||||
char*& operator -= (int decr)
|
char*& operator -= (int decr)
|
||||||
{
|
{
|
||||||
check(_cur - decr);
|
checkBounds(_cur - decr);
|
||||||
return _cur -= decr;
|
return _cur -= decr;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -242,7 +242,7 @@ namespace Impl {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void check(char* ptr)
|
void checkBounds(char* ptr)
|
||||||
{
|
{
|
||||||
if (ptr > _end) throw RangeException();
|
if (ptr > _end) throw RangeException();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user