~ubuntu-branches/ubuntu/trusty/emscripten/trusty-proposed

« back to all changes in this revision

Viewing changes to system/lib/libcxx/strstream.cpp

  • Committer: Package Import Robot
  • Author(s): Sylvestre Ledru
  • Date: 2014-01-19 14:12:40 UTC
  • mfrom: (1.2.4)
  • Revision ID: package-import@ubuntu.com-20140119141240-jg1l42cc158j59tn
Tags: 1.9.0~20140119~7dc8c2f-1
* New snapshot release (Closes: #733714)
* Provide sources for javascript and flash. Done in orig-tar.sh
  Available in third_party/websockify/include/web-socket-js/src/
  (Closes: #735903)

Show diffs side-by-side

added added

removed removed

Lines of Context:
156
156
    {
157
157
        if ((__strmode_ & __dynamic) == 0 || (__strmode_ & __frozen) != 0)
158
158
            return int_type(EOF);
159
 
        streamsize old_size = (epptr() ? epptr() : egptr()) - eback();
160
 
        streamsize new_size = max<streamsize>(__alsize_, 2*old_size);
 
159
        size_t old_size = static_cast<size_t> ((epptr() ? epptr() : egptr()) - eback());
 
160
        size_t new_size = max<size_t>(static_cast<size_t>(__alsize_), 2*old_size);
161
161
        if (new_size == 0)
162
162
            new_size = __default_alsize;
163
163
        char* buf = nullptr;
164
164
        if (__palloc_)
165
 
            buf = static_cast<char*>(__palloc_(static_cast<size_t>(new_size)));
 
165
            buf = static_cast<char*>(__palloc_(new_size));
166
166
        else
167
167
            buf = new char[new_size];
168
168
        if (buf == nullptr)
229
229
strstreambuf::seekoff(off_type __off, ios_base::seekdir __way, ios_base::openmode __which)
230
230
{
231
231
    off_type __p(-1);
232
 
    bool pos_in = __which & ios::in;
233
 
    bool pos_out = __which & ios::out;
 
232
    bool pos_in = (__which & ios::in) != 0;
 
233
    bool pos_out = (__which & ios::out) != 0;
234
234
    bool legal = false;
235
235
    switch (__way)
236
236
    {
287
287
strstreambuf::seekpos(pos_type __sp, ios_base::openmode __which)
288
288
{
289
289
    off_type __p(-1);
290
 
    bool pos_in = __which & ios::in;
291
 
    bool pos_out = __which & ios::out;
 
290
    bool pos_in = (__which & ios::in) != 0;
 
291
    bool pos_out = (__which & ios::out) != 0;
292
292
    if (pos_in || pos_out)
293
293
    {
294
294
        if (!((pos_in && gptr() == nullptr) || (pos_out && pptr() == nullptr)))