diff options
| author | Tyge <[email protected]> | 2020-04-25 08:44:21 +0200 |
|---|---|---|
| committer | Tyge <[email protected]> | 2020-04-25 08:44:21 +0200 |
| commit | 92ef0be8aaf987754d3b5adc1fa90fc1cfd09a20 (patch) | |
| tree | 5515af1a3a06aec7d509c9c1d2876f30e8a3e971 /stc/cstring.h | |
| parent | d5864c05f08357a8849d1e928dcb57f16cc0f920 (diff) | |
| download | STC-modified-92ef0be8aaf987754d3b5adc1fa90fc1cfd09a20.tar.gz STC-modified-92ef0be8aaf987754d3b5adc1fa90fc1cfd09a20.zip | |
Renamed cslist to cflist (forward_list). Renamed cstring_makeCopy() to cstring_clone()
Diffstat (limited to 'stc/cstring.h')
| -rw-r--r-- | stc/cstring.h | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/stc/cstring.h b/stc/cstring.h index 99ab4e81..535dd0f9 100644 --- a/stc/cstring.h +++ b/stc/cstring.h @@ -64,13 +64,6 @@ cstring_resize(CString* self, size_t len, char fill) { self->str[ _cstring_rep(*self)[0] = len ] = '\0';
}
-static inline CString
-cstring_move(CString* self) {
- CString mv = *self;
- *self = cstring_init;
- return mv;
-}
-
static inline void
cstring_destroy(CString* self) {
if (cstring_capacity(*self)) {
@@ -102,10 +95,17 @@ cstring_make(const char* str) { }
static inline CString
-cstring_makeCopy(CString cs) {
+cstring_clone(CString cs) {
return cstring_makeN(cs.str, cstring_size(cs));
}
+static inline CString
+cstring_move(CString* self) {
+ CString mv = *self;
+ *self = cstring_init;
+ return mv;
+}
+
static inline void
cstring_clear(CString* self) {
CString cs = cstring_init;
|
