diff options
| author | Tyge Løvset <[email protected]> | 2022-10-25 14:08:43 +0200 |
|---|---|---|
| committer | Tyge Løvset <[email protected]> | 2022-10-25 14:08:43 +0200 |
| commit | 89429e8e8242df35bc482c13c4a9f2b23e62e51d (patch) | |
| tree | 2a5a82ec84e6e71299d455e5683bc9193b3fe6f2 /include/stc/cbox.h | |
| parent | 538fdd51a7e530adf2ab31a76deb9ac8e52f525e (diff) | |
| download | STC-modified-89429e8e8242df35bc482c13c4a9f2b23e62e51d.tar.gz STC-modified-89429e8e8242df35bc482c13c4a9f2b23e62e51d.zip | |
More and hopefully final fixes of cbox/carc.
API change: _from = _make, _new => _from
Diffstat (limited to 'include/stc/cbox.h')
| -rw-r--r-- | include/stc/cbox.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/include/stc/cbox.h b/include/stc/cbox.h index cb8b7069..fb4452a4 100644 --- a/include/stc/cbox.h +++ b/include/stc/cbox.h @@ -94,7 +94,7 @@ STC_INLINE _cx_self _cx_memb(_from_ptr)(_cx_value* p) { return c_make(_cx_self){p}; } // c++: std::make_unique<i_key>(val) -STC_INLINE _cx_self _cx_memb(_from)(_cx_value val) { +STC_INLINE _cx_self _cx_memb(_make)(_cx_value val) { _cx_self ptr = {c_alloc(_cx_value)}; *ptr.get = val; return ptr; } @@ -129,11 +129,11 @@ STC_INLINE void _cx_memb(_reset_to)(_cx_self* self, _cx_value* p) { } #ifndef _i_no_emplace -STC_INLINE _cx_self _cx_memb(_new)(_cx_raw raw) - { return _cx_memb(_from)(i_keyfrom(raw)); } +STC_INLINE _cx_self _cx_memb(_from)(_cx_raw raw) + { return _cx_memb(_make)(i_keyfrom(raw)); } #else -STC_INLINE _cx_self _cx_memb(_new)(_cx_value val) - { return _cx_memb(_from)(val); } +STC_INLINE _cx_self _cx_memb(_from)(_cx_value val) + { return _cx_memb(_make)(val); } #endif #if !defined _i_no_clone |
