Skip to content

Commit

Permalink
AK: Remove FixedArray class.
Browse files Browse the repository at this point in the history
  • Loading branch information
asynts authored and awesomekling committed Sep 8, 2020
1 parent ec1080b commit 70dd97c
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 254 deletions.
165 changes: 0 additions & 165 deletions AK/FixedArray.h

This file was deleted.

4 changes: 0 additions & 4 deletions AK/Forward.h
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,6 @@ class HashMap;
template<typename T>
class Badge;

template<typename T>
class FixedArray;

template<typename>
class Function;

Expand Down Expand Up @@ -141,7 +138,6 @@ using AK::CircularQueue;
using AK::DebugLogStream;
using AK::DoublyLinkedList;
using AK::DuplexMemoryStream;
using AK::FixedArray;
using AK::FlyString;
using AK::Function;
using AK::HashMap;
Expand Down
81 changes: 0 additions & 81 deletions AK/Tests/TestFixedArray.cpp

This file was deleted.

16 changes: 15 additions & 1 deletion AK/Tests/TestVector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@

#include <AK/TestSuite.h>

#include <AK/String.h>
#include <AK/NonnullOwnPtrVector.h>
#include <AK/OwnPtr.h>
#include <AK/String.h>
#include <AK/Vector.h>

TEST_CASE(construct)
Expand Down Expand Up @@ -313,4 +313,18 @@ TEST_CASE(insert_trivial)
EXPECT_EQ(ints[5], 40);
}

TEST_CASE(resize_initializes)
{
struct A {
A() { initialized = true; }
bool initialized { false };
};

Vector<A> ints;
ints.resize(32);

for (size_t idx = 0; idx < 32; ++idx)
EXPECT(ints[idx].initialized);
}

TEST_MAIN(Vector)
1 change: 0 additions & 1 deletion Kernel/Time/HPET.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@

#pragma once

#include <AK/FixedArray.h>
#include <AK/NonnullRefPtrVector.h>
#include <AK/OwnPtr.h>
#include <AK/Types.h>
Expand Down
1 change: 0 additions & 1 deletion Kernel/Time/TimeManagement.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@

#pragma once

#include <AK/FixedArray.h>
#include <AK/NonnullRefPtrVector.h>
#include <AK/RefPtr.h>
#include <AK/Types.h>
Expand Down
2 changes: 1 addition & 1 deletion Libraries/LibGUI/CppLexer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ constexpr const char* s_known_types[] = {
"Deque",
"DoublyLinkedList",
"FileSystemPath",
"FixedArray",
"Array",
"Function",
"HashMap",
"HashTable",
Expand Down

0 comments on commit 70dd97c

Please sign in to comment.