mirror of
https://github.com/usatiuk/ficus.git
synced 2025-10-29 00:27:52 +01:00
rename list to list
This commit is contained in:
@@ -2,8 +2,8 @@
|
||||
// Created by Stepan Usatiuk on 21.10.2023.
|
||||
//
|
||||
|
||||
#ifndef OS2_LISTQUEUE_HPP
|
||||
#define OS2_LISTQUEUE_HPP
|
||||
#ifndef OS2_LIST_HPP
|
||||
#define OS2_LIST_HPP
|
||||
|
||||
#include <atomic>
|
||||
#include <cstdint>
|
||||
@@ -12,7 +12,7 @@
|
||||
#include "serial.hpp"
|
||||
|
||||
template<typename T>
|
||||
class ListQueue {
|
||||
class List {
|
||||
public:
|
||||
struct Node {
|
||||
T val;
|
||||
@@ -24,8 +24,8 @@ private:
|
||||
Node *tail = nullptr;
|
||||
|
||||
public:
|
||||
ListQueue() = default;
|
||||
~ListQueue() {
|
||||
List() = default;
|
||||
~List() {
|
||||
while (!empty()) {
|
||||
pop_back();
|
||||
}
|
||||
@@ -90,4 +90,4 @@ public:
|
||||
};
|
||||
|
||||
|
||||
#endif//OS2_LISTQUEUE_HPP
|
||||
#endif//OS2_LIST_HPP
|
||||
@@ -5,7 +5,7 @@
|
||||
#include "TestTemplates.hpp"
|
||||
|
||||
|
||||
#include "ListQueue.hpp"
|
||||
#include "List.hpp"
|
||||
#include "PointersCollection.hpp"
|
||||
#include "SkipList.hpp"
|
||||
#include "SkipListSet.hpp"
|
||||
@@ -210,8 +210,8 @@ void test_unique_ptr() {
|
||||
assert(*ptr == "Hello");
|
||||
}
|
||||
|
||||
void test_list_queue() {
|
||||
ListQueue<int> lq;
|
||||
void test_list() {
|
||||
List<int> lq;
|
||||
for (int i = 0; i < 5; i++) {
|
||||
assert(lq.empty());
|
||||
lq.emplace_front(1);
|
||||
@@ -264,6 +264,6 @@ int test_templates() {
|
||||
COWTester cowTester;
|
||||
cowTester.test();
|
||||
test_unique_ptr();
|
||||
test_list_queue();
|
||||
test_list();
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user