Changeset d13b67a in mainline for uspace/lib/cpp/src/ios.cpp


Ignore:
Timestamp:
2018-07-05T21:41:18Z (6 years ago)
Author:
Dzejrou <dzejrou@…>
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)
Message:

cpp: fixed minor bugs that prevented ios from compilation

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/cpp/src/ios.cpp

    r00d9778 rd13b67a  
    3131namespace std
    3232{
     33    int ios_base::index_{};
     34    bool ios_base::sync_{true};
     35    long ios_base::ierror_{0};
     36    void* ios_base::perror_{nullptr};
     37
    3338    ios_base::ios_base()
    3439        : iarray_{}, parray_{}, iarray_size_{}, parray_size_{},
     
    3742    { /* DUMMY BODY */ }
    3843
    39     ~ios_base::ios_base()
     44    ios_base::~ios_base()
    4045    {
    4146        for (auto& callback: callbacks_)
     
    4348    }
    4449
    45     auto ios_base::flags() -> fmtflags const
     50    auto ios_base::flags() const -> fmtflags
    4651    {
    4752        return flags_;
     
    7580    void ios_base::unsetf(fmtflags fmtfl)
    7681    {
    77         flags_ &= ~fmtflags;
     82        flags_ &= ~fmtfl;
    7883    }
    7984
     
    115120    }
    116121
    117     locale ios_base::get_loc() const
     122    locale ios_base::getloc() const
    118123    {
    119124        return locale_;
     
    156161        if (!parray_)
    157162        {
    158             parray_ = new long[initial_size_];
     163            parray_ = new void*[initial_size_];
    159164            parray_size_ = initial_size_;
    160165        }
     
    165170          //       and return perror_.
    166171            size_t new_size = max(parray_size_ * 2, idx + 1);
    167             auto tmp = new long[new_size];
     172            auto tmp = new void*[new_size];
    168173
    169174            for (size_t i = 0; i < parray_size_; ++i)
     
    186191    void ios_base::register_callback(event_callback fn, int index)
    187192    {
    188         callbacks.emplace_back(fn, index);
     193        callbacks_.emplace_back(fn, index);
    189194    }
    190195
Note: See TracChangeset for help on using the changeset viewer.