diff options
Diffstat (limited to '3rdParty/Boost/src/boost/format/internals.hpp')
| -rw-r--r-- | 3rdParty/Boost/src/boost/format/internals.hpp | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/3rdParty/Boost/src/boost/format/internals.hpp b/3rdParty/Boost/src/boost/format/internals.hpp index b0d874a..1c67006 100644 --- a/3rdParty/Boost/src/boost/format/internals.hpp +++ b/3rdParty/Boost/src/boost/format/internals.hpp @@ -105,4 +105,13 @@ namespace detail { void stream_format_state<Ch,Tr>:: apply_on (basic_ios & os, boost::io::detail::locale_t * loc_default) const { + // If a locale is available, set it first. "os.fill(fill_);" may chrash otherwise. +#if !defined(BOOST_NO_STD_LOCALE) + if(loc_) + os.imbue(loc_.get()); + else if(loc_default) + os.imbue(*loc_default); +#else + (void) loc_default; // keep compiler quiet if we don't support locales +#endif // set the state of this stream according to our params if(width_ != -1) @@ -115,12 +124,4 @@ namespace detail { os.clear(rdstate_); os.exceptions(exceptions_); -#if !defined(BOOST_NO_STD_LOCALE) - if(loc_) - os.imbue(loc_.get()); - else if(loc_default) - os.imbue(*loc_default); -#else - (void) loc_default; // keep compiler quiet if we don't support locales -#endif } |
Swift