--- parser3/src/include/pa_string.h 2009/04/22 04:37:52 1.178 +++ parser3/src/include/pa_string.h 2009/05/05 10:59:05 1.180 @@ -1,14 +1,14 @@ /** @file Parser: string class decl. - Copyright (c) 2001-2005 ArtLebedev Group (http://www.artlebedev.com) + Copyright (c) 2001-2009 ArtLebedev Group (http://www.artlebedev.com) Author: Alexandr Petrosian (http://paf.design.ru) */ #ifndef PA_STRING_H #define PA_STRING_H -static const char * const IDENT_STRING_H="$Date: 2009/04/22 04:37:52 $"; +static const char * const IDENT_STRING_H="$Date: 2009/05/05 10:59:05 $"; // includes #include "pa_types.h" @@ -117,9 +117,9 @@ public: struct { #ifdef PA_LITTLE_ENDIAN Language lang:8; - int is_not_just_lang:sizeof(CORD)*8-8; + size_t is_not_just_lang:sizeof(CORD)*8-8; #elif defined(PA_BIG_ENDIAN) - int is_not_just_lang:sizeof(CORD)*8-8; + size_t is_not_just_lang:sizeof(CORD)*8-8; Language lang:8; #else # error word endianness not determined for some obscure reason @@ -337,7 +337,7 @@ public: Body mid(size_t index, size_t length) const { return CORD_substr(body, index, length); } size_t pos(const char* substr, size_t offset=0) const { return CORD_str(body, offset, substr); } size_t pos(const Body substr, size_t offset=0) const { - if(!substr.length()) + if(substr.is_empty()) return STRING_NOT_FOUND; // in this case CORD_str returns 0 [parser users got used to -1] // CORD_str checks for bad offset [CORD_chr does not]