Skip to content

Commit abdc863

Browse files
committed
Remove overload without end pointer
1 parent b9ef0ea commit abdc863

File tree

3 files changed

+1
-10
lines changed

3 files changed

+1
-10
lines changed

include/boost/decimal/detail/io.hpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,8 +170,7 @@ auto operator<<(std::basic_ostream<charT, traits>& os, const DecimalType& d)
170170
}
171171

172172
*r.ptr = '\0';
173-
174-
detail::convert_string_to_local_locale(buffer, os.getloc());
173+
detail::convert_pointer_pair_to_local_locale(buffer, buffer + sizeof(buffer), os.getloc());
175174

176175
BOOST_DECIMAL_IF_CONSTEXPR (!std::is_same<charT, char>::value)
177176
{

include/boost/decimal/detail/locale_conversion.hpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -183,11 +183,6 @@ inline int convert_pointer_pair_to_local_locale(char* first, char* last)
183183
return convert_pointer_pair_to_local_locale(first, last, loc);
184184
}
185185

186-
inline int convert_string_to_local_locale(char* buffer, const std::locale& loc) noexcept
187-
{
188-
return convert_pointer_pair_to_local_locale(buffer, buffer + std::strlen(buffer), loc);
189-
}
190-
191186
} //namespace detail
192187
} //namespace decimal
193188
} //namespace boost

test/test_string_locale_conversion.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,6 @@ void test_conversion_from_c_locale(const char* locale, const char* res)
5252
char buffer2[64] {};
5353
std::memcpy(buffer2, str, strlen(str));
5454

55-
convert_string_to_local_locale(buffer);
56-
BOOST_TEST_CSTR_EQ(buffer, res);
57-
5855
convert_pointer_pair_to_local_locale(buffer2, buffer2 + sizeof(buffer2));
5956
BOOST_TEST_CSTR_EQ(buffer2, res);
6057
}

0 commit comments

Comments
 (0)