Ignore:
Timestamp:
06/25/20 00:34:29 (4 years ago)
Author:
Maciej Komosinski
Message:

Genetic format ID becomes a string (no longer limited to a single character)

File:
1 edited

Legend:

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

    r889 r955  
    7070        SString(); ///< make an empty string
    7171        SString(const char*t, int t_len = -1); ///< make a string from char*
    72         SString(int x); ///< string with initial buffer size
     72        SString(int x) = delete; ///< disallow the former 'int' constructor (so the new 'char' version is not used through implicit conversion)
    7373        SString(const SString& from); ///< duplicate string
    7474        SString(SString&& from); ///< move
     75        SString(char in);
    7576        ~SString();
    7677
     
    8687        int len() const { return buf->used; } ///< get string length
    8788        void shrink(); ///< free unnecessary buffer
     89        void reserve(int needed) { ensureSize(needed); } ///< like in std::string
    8890
    8991        /// after this call, you can modify sstring directly.
Note: See TracChangeset for help on using the changeset viewer.