forked from boostorg/regex
Change "id" to "idx" to be Objective C++ compatible.
Fixes #2306. Fixes #4132. Fixes #4191. [SVN r61789]
This commit is contained in:
@ -155,16 +155,16 @@ c_regex_traits<char>::char_class_type BOOST_REGEX_CALL c_regex_traits<char>::loo
|
||||
char_class_xdigit,
|
||||
};
|
||||
|
||||
int id = ::boost::re_detail::get_default_class_id(p1, p2);
|
||||
if(id < 0)
|
||||
int idx = ::boost::re_detail::get_default_class_id(p1, p2);
|
||||
if(idx < 0)
|
||||
{
|
||||
std::string s(p1, p2);
|
||||
for(std::string::size_type i = 0; i < s.size(); ++i)
|
||||
s[i] = static_cast<char>((std::tolower)(static_cast<unsigned char>(s[i])));
|
||||
id = ::boost::re_detail::get_default_class_id(&*s.begin(), &*s.begin() + s.size());
|
||||
idx = ::boost::re_detail::get_default_class_id(&*s.begin(), &*s.begin() + s.size());
|
||||
}
|
||||
BOOST_ASSERT(std::size_t(id+1) < sizeof(masks) / sizeof(masks[0]));
|
||||
return masks[id+1];
|
||||
BOOST_ASSERT(std::size_t(idx+1) < sizeof(masks) / sizeof(masks[0]));
|
||||
return masks[idx+1];
|
||||
}
|
||||
|
||||
bool BOOST_REGEX_CALL c_regex_traits<char>::isctype(char c, char_class_type mask)
|
||||
|
Reference in New Issue
Block a user