diff --git a/include/data_structures/concurrent/concurrent_list.hpp b/include/data_structures/concurrent/concurrent_list.hpp index 0e364a325..76e547eda 100644 --- a/include/data_structures/concurrent/concurrent_list.hpp +++ b/include/data_structures/concurrent/concurrent_list.hpp @@ -7,7 +7,7 @@ template class List { - +private: template static V load(std::atomic &atomic) { @@ -33,7 +33,6 @@ class List return atomic.exchange(desired, std::memory_order_seq_cst); } -private: class Node { public: diff --git a/include/storage/record_accessor.hpp b/include/storage/record_accessor.hpp index 8928b90ad..4703509cc 100644 --- a/include/storage/record_accessor.hpp +++ b/include/storage/record_accessor.hpp @@ -103,8 +103,13 @@ public: } protected: + IndexRecord create_index_record() + { + return create_index_record(std::nullptr_t()); + } + template - IndexRecord create_ir(K &&key) + IndexRecord create_index_record(K &&key) { return IndexRecord(std::move(key), record, vlist); } diff --git a/include/storage/vertices.hpp b/include/storage/vertices.hpp index 616f63ed9..b3503afd5 100644 --- a/include/storage/vertices.hpp +++ b/include/storage/vertices.hpp @@ -3,10 +3,7 @@ #include #include #include "data_structures/concurrent/concurrent_map.hpp" -// #include "database/db_transaction.hpp" #include "storage/common.hpp" -// #include "storage/indexes/index.hpp" -// #include "storage/indexes/index_record_collection.hpp" #include "storage/model/properties/property_family.hpp" #include "storage/vertex_accessor.hpp" #include "utils/option.hpp" @@ -33,7 +30,7 @@ public: private: vertices_t vertices; - // TODO: Because familys wont be removed this could be done with more + // TODO: Because families wont be removed this could be done with more // efficent // data structure. prop_familys_t prop_familys; diff --git a/include/utils/border.hpp b/include/utils/border.hpp index 94e56a712..641ee1d29 100644 --- a/include/utils/border.hpp +++ b/include/utils/border.hpp @@ -26,14 +26,14 @@ public: Border &operator=(Border &&other) = default; Border &operator=(Border &other) = default; - // true if no border or this>key or this>=key depends on border type. + // true if no border or this > key or this >= key depends on border type. bool operator>(const T &other) const { return !key.is_present() || key.get() > other || (type == Including && key.get() == other); } - // true if no border or this -class FunctionIterator : public IteratorBase +class LambdaIterator : public IteratorBase { public: - FunctionIterator(F &&f) : func(std::move(f)) {} + LambdaIterator(F &&f) : func(std::move(f)) {} Option next() final { return func(); } @@ -19,7 +19,7 @@ private: F func; }; -// Wraps function which returns options as an iterator. +// Wraps lambda which returns options as an iterator. template auto make_iterator(F &&f) { @@ -27,6 +27,6 @@ auto make_iterator(F &&f) // FunctionIterator compiler can't deduce it thats way there is decltype in // construction of FunctionIterator. Resoulting type of iter.next().take() // is T. - return FunctionIterator(std::move(f)); + return LambdaIterator(std::move(f)); } } diff --git a/src/data_structures/map/rh_common.hpp b/src/data_structures/map/rh_common.hpp index 9fa396e30..244e1ec52 100644 --- a/src/data_structures/map/rh_common.hpp +++ b/src/data_structures/map/rh_common.hpp @@ -6,8 +6,8 @@ #include "utils/option_ptr.hpp" // RobinHood base. -// Entrys are POINTERS alligned to 8B. -// Entrys must know thers key. +// Entries are POINTERS alligned to 8B. +// Entries must know thers key. // D must have method K& get_key() // K must be comparable with ==. template diff --git a/src/storage/vertex_accessor.cpp b/src/storage/vertex_accessor.cpp index ab27a5b3a..6ce4e8264 100644 --- a/src/storage/vertex_accessor.cpp +++ b/src/storage/vertex_accessor.cpp @@ -19,7 +19,7 @@ bool Vertex::Accessor::add_label(const Label &label) { // update vertex if (this->record->data.labels.add(label)) { - label.index->insert(create_ir(std::nullptr_t())); + label.index->insert(create_index_record()); return true; } return false;