Changeset 367 for cpp/frams


Ignore:
Timestamp:
04/20/15 03:15:26 (9 years ago)
Author:
Maciej Komosinski
Message:

SString move semantics

Location:
cpp/frams/util
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • cpp/frams/util/sstring.cpp

    r348 r367  
    134134if (!t) return;
    135135copyFrom(t,t_len);
     136}
     137
     138SString::SString(SString&& from)
     139{
     140buf=from.buf;
     141from.buf=&SBuf::empty();
    136142}
    137143
  • cpp/frams/util/sstring.h

    r348 r367  
    7272SString(int x); ///< string with initial buffer size
    7373SString(const SString& from); ///< duplicate string
     74SString(SString&& from); ///< move
    7475~SString();
    7576
Note: See TracChangeset for help on using the changeset viewer.