diff options
Diffstat (limited to 'boost/test/utils/runtime/cla/named_parameter.ipp')
-rw-r--r-- | boost/test/utils/runtime/cla/named_parameter.ipp | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/boost/test/utils/runtime/cla/named_parameter.ipp b/boost/test/utils/runtime/cla/named_parameter.ipp index e04348f53b..e59ebdf89c 100644 --- a/boost/test/utils/runtime/cla/named_parameter.ipp +++ b/boost/test/utils/runtime/cla/named_parameter.ipp @@ -1,6 +1,6 @@ -// (C) Copyright Gennadiy Rozental 2005-2008. -// Use, modification, and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// (C) Copyright Gennadiy Rozental 2005-2014. +// Use, modification, and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org/libs/test for the library home page. @@ -12,8 +12,8 @@ // Description : implements model of named parameter // *************************************************************************** -#ifndef BOOST_RT_CLA_NAMED_PARAMETER_IPP_062904GER -#define BOOST_RT_CLA_NAMED_PARAMETER_IPP_062904GER +#ifndef BOOST_TEST_UTILS_RUNTIME_CLA_NAMED_PARAMETER_IPP +#define BOOST_TEST_UTILS_RUNTIME_CLA_NAMED_PARAMETER_IPP // Boost.Runtime.Parameter #include <boost/test/utils/runtime/config.hpp> @@ -26,7 +26,7 @@ namespace boost { -namespace BOOST_RT_PARAM_NAMESPACE { +namespace BOOST_TEST_UTILS_RUNTIME_PARAM_NAMESPACE { namespace cla { @@ -34,17 +34,17 @@ namespace cla { // ************** string_name_policy ************** // // ************************************************************************** // -BOOST_RT_PARAM_INLINE +BOOST_TEST_UTILS_RUNTIME_PARAM_INLINE string_name_policy::string_name_policy() : basic_naming_policy( rtti::type_id<string_name_policy>() ) , m_guess_name( false ) { - assign_op( p_prefix.value, BOOST_RT_PARAM_CSTRING_LITERAL( "-" ), 0 ); + assign_op( p_prefix.value, BOOST_TEST_UTILS_RUNTIME_PARAM_CSTRING_LITERAL( "-" ), 0 ); } //____________________________________________________________________________// -BOOST_RT_PARAM_INLINE bool +BOOST_TEST_UTILS_RUNTIME_PARAM_INLINE bool string_name_policy::responds_to( cstring name ) const { std::pair<cstring::iterator,dstring::const_iterator> mm_pos; @@ -61,7 +61,7 @@ string_name_policy::responds_to( cstring name ) const # pragma warning(disable:4244) #endif -BOOST_RT_PARAM_INLINE bool +BOOST_TEST_UTILS_RUNTIME_PARAM_INLINE bool string_name_policy::conflict_with( identification_policy const& id ) const { if( id.p_type_id == p_type_id ) { @@ -80,16 +80,16 @@ string_name_policy::conflict_with( identification_policy const& id ) const ((m_guess_name && (mm_pos.second == snp.p_name->end()) ) || // that match other guy and I am guessing (snp.m_guess_name && (mm_pos.first == p_name->end()) )); // or me and the other guy is } - + if( id.p_type_id == rtti::type_id<char_name_policy>() ) { char_name_policy const& cnp = static_cast<char_name_policy const&>( id ); - return m_guess_name && - (p_prefix == cnp.p_prefix) && + return m_guess_name && + (p_prefix == cnp.p_prefix) && unit_test::first_char( cstring( p_name ) ) == unit_test::first_char( cstring( cnp.p_name ) ); } - - return false; + + return false; } #ifdef BOOST_MSVC @@ -98,7 +98,7 @@ string_name_policy::conflict_with( identification_policy const& id ) const //____________________________________________________________________________// -BOOST_RT_PARAM_INLINE bool +BOOST_TEST_UTILS_RUNTIME_PARAM_INLINE bool string_name_policy::match_name( argv_traverser& tr ) const { if( !m_guess_name ) @@ -107,13 +107,13 @@ string_name_policy::match_name( argv_traverser& tr ) const cstring in = tr.input(); std::pair<cstring::iterator,dstring::const_iterator> mm_pos; - + mm_pos = unit_test::mismatch( in.begin(), in.end(), p_name->begin(), p_name->end() ); if( mm_pos.first == in.begin() ) return false; - tr.trim( mm_pos.first - in.begin() ); + tr.trim( static_cast<std::size_t>(mm_pos.first - in.begin()) ); return true; } @@ -122,8 +122,8 @@ string_name_policy::match_name( argv_traverser& tr ) const } // namespace cla -} // namespace BOOST_RT_PARAM_NAMESPACE +} // namespace BOOST_TEST_UTILS_RUNTIME_PARAM_NAMESPACE } // namespace boost -#endif // BOOST_RT_CLA_NAMED_PARAMETER_IPP_062904GER +#endif // BOOST_TEST_UTILS_RUNTIME_CLA_NAMED_PARAMETER_IPP |