From e4d44fb37652ef83f19785c37d5a599f9a4bbd2d Mon Sep 17 00:00:00 2001 From: Michael Scire Date: Thu, 4 Feb 2021 02:29:54 -0800 Subject: [PATCH] util: add FixedSet --- libvapours/include/vapours/util.hpp | 2 +- .../include/vapours/util/util_fixed_set.hpp | 28 +++++++++++++++++++ .../include/vapours/util/util_fixed_tree.hpp | 2 ++ 3 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 libvapours/include/vapours/util/util_fixed_set.hpp diff --git a/libvapours/include/vapours/util.hpp b/libvapours/include/vapours/util.hpp index 6a57fefe..f0a9250e 100644 --- a/libvapours/include/vapours/util.hpp +++ b/libvapours/include/vapours/util.hpp @@ -46,8 +46,8 @@ #include #include -#include #include +#include #ifdef ATMOSPHERE_IS_STRATOSPHERE #include diff --git a/libvapours/include/vapours/util/util_fixed_set.hpp b/libvapours/include/vapours/util/util_fixed_set.hpp new file mode 100644 index 00000000..f5436a2a --- /dev/null +++ b/libvapours/include/vapours/util/util_fixed_set.hpp @@ -0,0 +1,28 @@ +/* + * Copyright (c) 2018-2020 Atmosphère-NX + * + * This program is free software; you can redistribute it and/or modify it + * under the terms and conditions of the GNU General Public License, + * version 2, as published by the Free Software Foundation. + * + * This program is distributed in the hope it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#pragma once +#include +#include +#include + +namespace ams::util { + + template, size_t BufferAlignment = 8> + class FixedSet : public ::ams::util::FixedTree { + /* ... */ + }; + +} diff --git a/libvapours/include/vapours/util/util_fixed_tree.hpp b/libvapours/include/vapours/util/util_fixed_tree.hpp index 493133b6..b0f348ba 100644 --- a/libvapours/include/vapours/util/util_fixed_tree.hpp +++ b/libvapours/include/vapours/util/util_fixed_tree.hpp @@ -993,4 +993,6 @@ namespace ams::util { } }; + + }