Skip to content

Commit 299e345

Browse files
committed
Update vector to use ORB namespace
1 parent 4926f73 commit 299e345

3 files changed

Lines changed: 25 additions & 25 deletions

File tree

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
11
//
22
// realloc_vector.hpp
3-
// OpenAttributeGraphCxx
3+
// OpenRenderBoxCxx
44

55
#ifndef realloc_vector_hpp
66
#define realloc_vector_hpp
77

8-
#include <OpenAttributeGraph/OAGBase.h>
8+
#include <OpenRenderBox/ORBBase.h>
99

10-
OAG_ASSUME_NONNULL_BEGIN
10+
ORB_ASSUME_NONNULL_BEGIN
1111

12-
namespace OAG {
12+
namespace ORB {
1313
namespace details {
1414
template <typename T = uint32_t, size_t Alignment>
1515
void *_Nullable realloc_vector(void* ptr, T& size, T new_size);
1616

1717
template <typename T = uint32_t, size_t Alignment>
1818
void *_Nullable realloc_vector(void* src, void* dst, T dstSize, T& size, T newSize);
1919
} /* details */
20-
} /* OAG */
20+
} /* ORB */
2121

22-
OAG_ASSUME_NONNULL_END
22+
ORB_ASSUME_NONNULL_END
2323

2424
#endif /* realloc_vector_hpp */

Sources/OpenRenderBox/include/OpenRenderBoxCxx/Vector/vector.hpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
//
22
// vector.hpp
3-
// OpenAttributeGraphCxx
3+
// OpenRenderBoxCxx
44
//
55
// Status: Complete
66
// Modified based Compute code
77

88
#ifndef vector_hpp
99
#define vector_hpp
1010

11-
#include <OpenAttributeGraph/OAGBase.h>
11+
#include <OpenRenderBox/ORBBase.h>
1212
#include <concepts>
1313
#include <iterator>
1414
#include <memory>
1515

16-
OAG_ASSUME_NONNULL_BEGIN
16+
ORB_ASSUME_NONNULL_BEGIN
1717

18-
namespace OAG {
18+
namespace ORB {
1919

2020
template <typename T, unsigned int _stack_size = 0, typename size_type = std::size_t>
2121
requires std::unsigned_integral<size_type>
@@ -224,16 +224,16 @@ class vector<std::unique_ptr<T>, 0, size_type> {
224224
void clear();
225225

226226
void push_back(const std::unique_ptr<T> &value) = delete;
227-
OAG_INLINE void push_back(std::unique_ptr<T> &&value);
228-
OAG_INLINE void pop_back();
227+
ORB_INLINE void push_back(std::unique_ptr<T> &&value);
228+
ORB_INLINE void pop_back();
229229

230230
void resize(size_type count);
231231
void resize(size_type count, const value_type &value);
232232
};
233233

234-
} /* OAG */
234+
} /* ORB */
235235

236-
OAG_ASSUME_NONNULL_END
236+
ORB_ASSUME_NONNULL_END
237237

238238
#include "vector.tpp"
239239

Sources/OpenRenderBox/include/OpenRenderBoxCxx/Vector/vector.tpp

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
//
22
// vector.tpp
3-
// OpenAttributeGraphCxx
3+
// OpenRenderBoxCxx
44
//
55
// Status: Complete
66
// Modified based Compute code
77

8-
#include <OpenAttributeGraphCxx/Vector/vector.hpp>
9-
#include <OpenAttributeGraphCxx/Misc/assert.hpp>
8+
#include <OpenRenderBoxCxx/Vector/vector.hpp>
9+
#include <OpenRenderBoxCxx/Util/assert.hpp>
1010

1111
#include <algorithm>
12-
#if OAG_TARGET_OS_DARWIN
12+
#if ORB_TARGET_OS_DARWIN
1313
#include <malloc/malloc.h>
1414
#else
1515
#include <malloc.h>
16-
#endif /* OAG_TARGET_OS_DARWIN */
16+
#endif /* ORB_TARGET_OS_DARWIN */
1717
#include <memory>
1818
#include <cassert>
1919

20-
namespace OAG {
20+
namespace ORB {
2121

2222
#pragma mark - Base implementation
2323

@@ -37,7 +37,7 @@ void *realloc_vector(void *buffer, void *stack_buffer, size_type stack_size, siz
3737
return nullptr;
3838
}
3939

40-
#if OAG_TARGET_OS_DARWIN
40+
#if ORB_TARGET_OS_DARWIN
4141
size_t new_size_bytes = malloc_good_size(preferred_new_size * element_size_bytes);
4242
#else
4343
size_t new_size_bytes = malloc_good_size(preferred_new_size * element_size_bytes);
@@ -179,7 +179,7 @@ void *realloc_vector(void *buffer, size_type *size, size_type preferred_new_size
179179
return nullptr;
180180
}
181181

182-
#if OAG_TARGET_OS_DARWIN
182+
#if ORB_TARGET_OS_DARWIN
183183
size_t new_size_bytes = malloc_good_size(preferred_new_size * element_size);
184184
#else
185185
size_t new_size_bytes = preferred_new_size * element_size;
@@ -360,15 +360,15 @@ void vector<std::unique_ptr<T>, 0, size_type>::reserve(size_type new_cap) {
360360

361361
template <typename T, typename size_type>
362362
requires std::unsigned_integral<size_type>
363-
OAG_INLINE void vector<std::unique_ptr<T>, 0, size_type>::push_back(std::unique_ptr<T> &&value) {
363+
ORB_INLINE void vector<std::unique_ptr<T>, 0, size_type>::push_back(std::unique_ptr<T> &&value) {
364364
reserve(_size + 1);
365365
new (&_buffer[_size]) std::unique_ptr<T>(std::move(value));
366366
++_size;
367367
}
368368

369369
template <typename T, typename size_type>
370370
requires std::unsigned_integral<size_type>
371-
OAG_INLINE void vector<std::unique_ptr<T>, 0, size_type>::pop_back() {
371+
ORB_INLINE void vector<std::unique_ptr<T>, 0, size_type>::pop_back() {
372372
assert(_size > 0);
373373
_buffer[_size - 1].reset();
374374
_buffer[_size - 1].~unique_ptr();
@@ -392,4 +392,4 @@ void vector<std::unique_ptr<T>, 0, size_type>::resize(size_type count) {
392392
_size = count;
393393
}
394394

395-
} /* OAG */
395+
} /* ORB */

0 commit comments

Comments
 (0)