rename Array to array
This commit is contained in:
@ -1,9 +1,9 @@
|
||||
#include "user/demo/ArrayDemo.h"
|
||||
|
||||
void ArrayDemo::run() {
|
||||
bse::Array<int, 10> arr1 {};
|
||||
bse::Array<int, 10> arr2 {};
|
||||
bse::Array<Thread*, 10> arr3 {};
|
||||
bse::array<int, 10> arr1 {};
|
||||
bse::array<int, 10> arr2 {};
|
||||
bse::array<Thread*, 10> arr3 {};
|
||||
|
||||
kout.lock();
|
||||
kout.clear();
|
||||
|
@ -86,7 +86,7 @@ void SmartPointerDemo::run() {
|
||||
|
||||
{
|
||||
log.info() << "Stackallocating Array<bse::unique_ptr<int>, 10>..." << endl;
|
||||
bse::Array<bse::unique_ptr<int>, 10> arr;
|
||||
bse::array<bse::unique_ptr<int>, 10> arr;
|
||||
log.info() << "Populating slot 0..." << endl;
|
||||
arr[0] = bse::make_unique<int>(1);
|
||||
log.info() << "Moving slot 0 to slot 1..." << endl;
|
||||
@ -97,7 +97,7 @@ void SmartPointerDemo::run() {
|
||||
|
||||
{
|
||||
log.info() << "Heapallocating Array<bse::unique_ptr<int>, 10>..." << endl;
|
||||
bse::Array<bse::unique_ptr<int>, 10>* arr = new bse::Array<bse::unique_ptr<int>, 10>;
|
||||
bse::array<bse::unique_ptr<int>, 10>* arr = new bse::array<bse::unique_ptr<int>, 10>;
|
||||
log.info() << "Populating slot 0..." << endl;
|
||||
(*arr)[0] = bse::make_unique<int>(1);
|
||||
log.info() << "Moving slot 0 to slot 1..." << endl;
|
||||
|
@ -8,7 +8,7 @@
|
||||
namespace bse {
|
||||
|
||||
template<typename T, const std::size_t N>
|
||||
class Array {
|
||||
class array {
|
||||
public:
|
||||
using Iterator = ContinuousIterator<T>;
|
||||
|
||||
@ -27,7 +27,7 @@ namespace bse {
|
||||
return this->buf[i];
|
||||
}
|
||||
|
||||
void swap(Array<T, N>& other) {
|
||||
void swap(array<T, N>& other) {
|
||||
for (std::size_t i = 0; i < N; ++i) {
|
||||
std::swap(this->buf[i], other[i]);
|
||||
}
|
||||
@ -36,7 +36,7 @@ namespace bse {
|
||||
// Array& other has to have size n:
|
||||
// arr1.swap_n<5>(arr2) => arr2 has size 5, arr1 has size >= 5
|
||||
template<std::size_t n>
|
||||
void swap_n(Array<T, n>& other) {
|
||||
void swap_n(array<T, n>& other) {
|
||||
for (std::size_t i = 0; i < n; ++i) {
|
||||
std::swap(this->buf[i], other[i]);
|
||||
}
|
||||
|
Reference in New Issue
Block a user