Remove a switch statement, and replace with a bunch of ifs to silence a warning about 'all the enumeration values covered'. No functional change.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@246150 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
961269db1b
commit
5ea443059f
@ -4316,18 +4316,9 @@ wbuffer_convert<_Codecvt, _Elem, _Tr>::seekoff(off_type __off, ios_base::seekdir
|
|||||||
int __width = __cv_->encoding();
|
int __width = __cv_->encoding();
|
||||||
if (__cv_ == 0 || __bufptr_ == 0 || (__width <= 0 && __off != 0) || sync())
|
if (__cv_ == 0 || __bufptr_ == 0 || (__width <= 0 && __off != 0) || sync())
|
||||||
return pos_type(off_type(-1));
|
return pos_type(off_type(-1));
|
||||||
// __width > 0 || __off == 0
|
// __width > 0 || __off == 0, now check __way
|
||||||
switch (__way)
|
if (__way != ios_base::beg && __way != ios_base::cur && __way != ios_base::end)
|
||||||
{
|
|
||||||
case ios_base::beg:
|
|
||||||
break;
|
|
||||||
case ios_base::cur:
|
|
||||||
break;
|
|
||||||
case ios_base::end:
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
return pos_type(off_type(-1));
|
return pos_type(off_type(-1));
|
||||||
}
|
|
||||||
pos_type __r = __bufptr_->pubseekoff(__width * __off, __way, __om);
|
pos_type __r = __bufptr_->pubseekoff(__width * __off, __way, __om);
|
||||||
__r.state(__st_);
|
__r.state(__st_);
|
||||||
return __r;
|
return __r;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user