summaryrefslogtreecommitdiffstats
path: root/libcxx
diff options
context:
space:
mode:
authorMarshall Clow <mclow.lists@gmail.com>2015-08-27 14:37:22 +0000
committerMarshall Clow <mclow.lists@gmail.com>2015-08-27 14:37:22 +0000
commit3e61f238c6e5382038250613b5bfcca3da31bad1 (patch)
tree221115296159eeb1d9cc9b8f47435fb398b00f80 /libcxx
parentc94f8e2906e7a7f3672e8506010c2d42b31dfa79 (diff)
downloadbcm5719-llvm-3e61f238c6e5382038250613b5bfcca3da31bad1.tar.gz
bcm5719-llvm-3e61f238c6e5382038250613b5bfcca3da31bad1.zip
Remove a switch statement, and replace with a bunch of ifs to silence a warning about 'all the enumeration values covered'. No functional change.
llvm-svn: 246150
Diffstat (limited to 'libcxx')
-rw-r--r--libcxx/include/locale13
1 files changed, 2 insertions, 11 deletions
diff --git a/libcxx/include/locale b/libcxx/include/locale
index 456bd1c6c00..74898be135f 100644
--- a/libcxx/include/locale
+++ b/libcxx/include/locale
@@ -4316,18 +4316,9 @@ wbuffer_convert<_Codecvt, _Elem, _Tr>::seekoff(off_type __off, ios_base::seekdir
int __width = __cv_->encoding();
if (__cv_ == 0 || __bufptr_ == 0 || (__width <= 0 && __off != 0) || sync())
return pos_type(off_type(-1));
- // __width > 0 || __off == 0
- switch (__way)
- {
- case ios_base::beg:
- break;
- case ios_base::cur:
- break;
- case ios_base::end:
- break;
- default:
+ // __width > 0 || __off == 0, now check __way
+ if (__way != ios_base::beg && __way != ios_base::cur && __way != ios_base::end)
return pos_type(off_type(-1));
- }
pos_type __r = __bufptr_->pubseekoff(__width * __off, __way, __om);
__r.state(__st_);
return __r;
OpenPOWER on IntegriCloud