mirror of
https://github.com/boostorg/utility.git
synced 2025-05-11 13:24:02 +00:00
Clear a few existing warnings.
This commit is contained in:
parent
98b24e1406
commit
404fea073f
@ -130,24 +130,29 @@ void find ( const char *arg ) {
|
|||||||
p = arg;
|
p = arg;
|
||||||
// for all possible chars, see if we find them in the right place.
|
// for all possible chars, see if we find them in the right place.
|
||||||
// Note that strchr will/might do the _wrong_ thing if we search for NULL
|
// Note that strchr will/might do the _wrong_ thing if we search for NULL
|
||||||
for ( int ch = 1; ch < 256; ++ch ) {
|
|
||||||
|
for ( unsigned char ch = 1u; ; ++ch ) {
|
||||||
string_view::size_type pos = sr1.find(ch);
|
string_view::size_type pos = sr1.find(ch);
|
||||||
const char *strp = std::strchr ( arg, ch );
|
const char *strp = std::strchr ( arg, ch );
|
||||||
BOOST_CHECK (( strp == NULL ) == ( pos == string_view::npos ));
|
BOOST_CHECK (( strp == NULL ) == ( pos == string_view::npos ));
|
||||||
if ( strp != NULL )
|
if ( strp != NULL )
|
||||||
BOOST_CHECK ( ptr_diff ( strp, arg ) == pos );
|
BOOST_CHECK ( ptr_diff ( strp, arg ) == pos );
|
||||||
}
|
if (ch == 255u)
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
sr1 = arg;
|
sr1 = arg;
|
||||||
p = arg;
|
p = arg;
|
||||||
// for all possible chars, see if we find them in the right place.
|
// for all possible chars, see if we find them in the right place.
|
||||||
// Note that strchr will/might do the _wrong_ thing if we search for NULL
|
// Note that strchr will/might do the _wrong_ thing if we search for NULL
|
||||||
for ( int ch = 1; ch < 256; ++ch ) {
|
for ( unsigned char ch = 1u; ; ++ch ) {
|
||||||
string_view::size_type pos = sr1.rfind(ch);
|
string_view::size_type pos = sr1.rfind(ch);
|
||||||
const char *strp = std::strrchr ( arg, ch );
|
const char *strp = std::strrchr ( arg, ch );
|
||||||
BOOST_CHECK (( strp == NULL ) == ( pos == string_view::npos ));
|
BOOST_CHECK (( strp == NULL ) == ( pos == string_view::npos ));
|
||||||
if ( strp != NULL )
|
if ( strp != NULL )
|
||||||
BOOST_CHECK ( ptr_diff ( strp, arg ) == pos );
|
BOOST_CHECK ( ptr_diff ( strp, arg ) == pos );
|
||||||
|
if (ch == 255u)
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -75,7 +75,7 @@ struct context
|
|||||||
BOOST_AUTO_TEST_CASE_TEMPLATE(string_view_output, CharT, char_types)
|
BOOST_AUTO_TEST_CASE_TEMPLATE(string_view_output, CharT, char_types)
|
||||||
{
|
{
|
||||||
typedef CharT char_type;
|
typedef CharT char_type;
|
||||||
typedef std::basic_string< char_type > string_type;
|
//typedef std::basic_string< char_type > string_type;
|
||||||
typedef std::basic_ostringstream< char_type > ostream_type;
|
typedef std::basic_ostringstream< char_type > ostream_type;
|
||||||
typedef boost::basic_string_view< char_type > string_view_type;
|
typedef boost::basic_string_view< char_type > string_view_type;
|
||||||
|
|
||||||
@ -90,7 +90,7 @@ BOOST_AUTO_TEST_CASE_TEMPLATE(string_view_output, CharT, char_types)
|
|||||||
BOOST_AUTO_TEST_CASE_TEMPLATE(padding, CharT, char_types)
|
BOOST_AUTO_TEST_CASE_TEMPLATE(padding, CharT, char_types)
|
||||||
{
|
{
|
||||||
typedef CharT char_type;
|
typedef CharT char_type;
|
||||||
typedef std::basic_string< char_type > string_type;
|
//typedef std::basic_string< char_type > string_type;
|
||||||
typedef std::basic_ostringstream< char_type > ostream_type;
|
typedef std::basic_ostringstream< char_type > ostream_type;
|
||||||
typedef boost::basic_string_view< char_type > string_view_type;
|
typedef boost::basic_string_view< char_type > string_view_type;
|
||||||
|
|
||||||
@ -134,7 +134,7 @@ BOOST_AUTO_TEST_CASE_TEMPLATE(padding, CharT, char_types)
|
|||||||
BOOST_AUTO_TEST_CASE_TEMPLATE(padding_fill, CharT, char_types)
|
BOOST_AUTO_TEST_CASE_TEMPLATE(padding_fill, CharT, char_types)
|
||||||
{
|
{
|
||||||
typedef CharT char_type;
|
typedef CharT char_type;
|
||||||
typedef std::basic_string< char_type > string_type;
|
//typedef std::basic_string< char_type > string_type;
|
||||||
typedef std::basic_ostringstream< char_type > ostream_type;
|
typedef std::basic_ostringstream< char_type > ostream_type;
|
||||||
typedef boost::basic_string_view< char_type > string_view_type;
|
typedef boost::basic_string_view< char_type > string_view_type;
|
||||||
|
|
||||||
@ -153,7 +153,7 @@ BOOST_AUTO_TEST_CASE_TEMPLATE(padding_fill, CharT, char_types)
|
|||||||
BOOST_AUTO_TEST_CASE_TEMPLATE(alignment, CharT, char_types)
|
BOOST_AUTO_TEST_CASE_TEMPLATE(alignment, CharT, char_types)
|
||||||
{
|
{
|
||||||
typedef CharT char_type;
|
typedef CharT char_type;
|
||||||
typedef std::basic_string< char_type > string_type;
|
//typedef std::basic_string< char_type > string_type;
|
||||||
typedef std::basic_ostringstream< char_type > ostream_type;
|
typedef std::basic_ostringstream< char_type > ostream_type;
|
||||||
typedef boost::basic_string_view< char_type > string_view_type;
|
typedef boost::basic_string_view< char_type > string_view_type;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user