Changeset d13b67a in mainline for uspace/lib/cpp/include/impl/ios.hpp
- Timestamp:
- 2018-07-05T21:41:18Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 9400dbe
- Parents:
- 00d9778
- git-author:
- Jaroslav Jindrak <dzejrou@…> (2017-11-08 23:49:39)
- git-committer:
- Dzejrou <dzejrou@…> (2018-07-05 21:41:18)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/cpp/include/impl/ios.hpp
r00d9778 rd13b67a 68 68 69 69 using fmtflags = uint16_t; 70 static constexpr fmtflags boolalpha = 0b '0000'0000'0000'0001;71 static constexpr fmtflags dec = 0b '0000'0000'0000'0010;72 static constexpr fmtflags fixed = 0b '0000'0000'0000'0100;73 static constexpr fmtflags hex = 0b '0000'0000'0000'1000;74 static constexpr fmtflags internal = 0b '0000'0000'0001'0000;75 static constexpr fmtflags left = 0b '0000'0000'0010'0000;76 static constexpr fmtflags oct = 0b '0000'0000'0100'0000;77 static constexpr fmtflags right = 0b '0000'0000'1000'0000;78 static constexpr fmtflags scientific = 0b '0000'0001'0000'0000;79 static constexpr fmtflags showbase = 0b '0000'0010'0000'0000;80 static constexpr fmtflags showpoint = 0b '0000'0100'0000'0000;81 static constexpr fmtflags showpos = 0b '0000'1000'0000'0000;82 static constexpr fmtflags skipws = 0b '0001'0000'0000'0000;83 static constexpr fmtflags unitbuf = 0b '0010'0000'0000'0000;84 static constexpr fmtflags uppercase = 0b '0100'0000'0000'0000;70 static constexpr fmtflags boolalpha = 0b0000'0000'0000'0001; 71 static constexpr fmtflags dec = 0b0000'0000'0000'0010; 72 static constexpr fmtflags fixed = 0b0000'0000'0000'0100; 73 static constexpr fmtflags hex = 0b0000'0000'0000'1000; 74 static constexpr fmtflags internal = 0b0000'0000'0001'0000; 75 static constexpr fmtflags left = 0b0000'0000'0010'0000; 76 static constexpr fmtflags oct = 0b0000'0000'0100'0000; 77 static constexpr fmtflags right = 0b0000'0000'1000'0000; 78 static constexpr fmtflags scientific = 0b0000'0001'0000'0000; 79 static constexpr fmtflags showbase = 0b0000'0010'0000'0000; 80 static constexpr fmtflags showpoint = 0b0000'0100'0000'0000; 81 static constexpr fmtflags showpos = 0b0000'1000'0000'0000; 82 static constexpr fmtflags skipws = 0b0001'0000'0000'0000; 83 static constexpr fmtflags unitbuf = 0b0010'0000'0000'0000; 84 static constexpr fmtflags uppercase = 0b0100'0000'0000'0000; 85 85 static constexpr fmtflags adjustfield = left | right | internal; 86 86 static constexpr fmtflags basefield = dec | oct | hex; … … 129 129 130 130 private: 131 static int init_cnt {};131 static int init_cnt; 132 132 }; 133 133 … … 195 195 196 196 private: 197 static int index_ {};198 static bool sync_ {true};199 200 static long ierror_ {0};201 static long perror_{nullptr};197 static int index_; 198 static bool sync_; 199 200 static long ierror_; 201 static void* perror_; 202 202 static constexpr size_t initial_size_{10}; 203 203 … … 282 282 rdstate_ = state | badbit; 283 283 284 if (((state | (rdbuf_ ? goodbit |badbit)) & exceptions_) == 0)284 if (((state | (rdbuf_ ? goodbit : badbit)) & exceptions_) == 0) 285 285 return; 286 286 // TODO: Else throw failure. … … 380 380 width_ = rhs.width_; 381 381 precision_ = rhs.precision_; 382 fill e_ = rhs.fill_;382 fill_ = rhs.fill_; 383 383 locale_ = rhs.locale_; 384 384 385 delete[] iarray ;385 delete[] iarray_; 386 386 iarray_size_ = rhs.iarray_size_; 387 387 iarray_ = new long[iarray_size_]; 388 388 389 389 for (size_t i = 0; i < iarray_size_; ++i) 390 iarra i_[i] = rhs.iarray_[i];391 392 delete[] parray ;390 iarray_[i] = rhs.iarray_[i]; 391 392 delete[] parray_; 393 393 parray_size_ = rhs.parray_size_; 394 394 parray_ = new long[parray_size_]; 395 395 396 396 for (size_t i = 0; i < parray_size_; ++i) 397 iarrai_[i] = rhs.parray_[i];397 parray_[i] = rhs.parray_[i]; 398 398 399 399 for (auto& callback: callbacks_) … … 456 456 locale_ = locale(); 457 457 458 iarray = nullptr;459 parray = nullptr458 iarray_ = nullptr; 459 parray_ = nullptr; 460 460 } 461 461 … … 527 527 swap(iarray_size_); 528 528 swap(parray_); 529 swap(parray_size_) 529 swap(parray_size_); 530 530 } 531 531
Note:
See TracChangeset
for help on using the changeset viewer.