Fixed order of calling use_facet vs setbuf in basic_filebuf default constructor.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@162571 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
8540d4c9d2
commit
e7d59f2601
@ -261,12 +261,12 @@ basic_filebuf<_CharT, _Traits>::basic_filebuf()
|
||||
__owns_ib_(false),
|
||||
__always_noconv_(false)
|
||||
{
|
||||
setbuf(0, 4096);
|
||||
if (has_facet<codecvt<char_type, char, state_type> >(this->getloc()))
|
||||
{
|
||||
__cv_ = &use_facet<codecvt<char_type, char, state_type> >(this->getloc());
|
||||
__always_noconv_ = __cv_->always_noconv();
|
||||
}
|
||||
setbuf(0, 4096);
|
||||
}
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
Loading…
x
Reference in New Issue
Block a user