Skip to content

Commit

Permalink
revert previous commits
Browse files Browse the repository at this point in the history
  • Loading branch information
Arthapz committed Feb 9, 2024
1 parent 90d6ce3 commit 7092349
Show file tree
Hide file tree
Showing 39 changed files with 546 additions and 750 deletions.
3 changes: 1 addition & 2 deletions modules/stormkit/Core/Containers/Tree.mpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
module;

#include <stormkit/Core/MemoryMacro.hpp>

#include <stormkit/Core/PlatformMacro.hpp>

export module stormkit.Core:Containers.Tree;
Expand Down Expand Up @@ -507,4 +506,4 @@ namespace stormkit::core {

stream.close();
}
} // namespace stormkit::core
} // namespace stormkit::core
4 changes: 1 addition & 3 deletions modules/stormkit/Core/Containers/Utils.mpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@ export module stormkit.Core:Containers.Utils;

import std;

import :Meta.Traits;
import :Meta.Concepts;

import :Meta;
import :Utils.Byte;

export namespace stormkit::core {
Expand Down
2 changes: 1 addition & 1 deletion modules/stormkit/Core/Hash/Base.mpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export module stormkit.Core:Hash.Base;

import std;

import :Meta.Concepts;
import :Meta;

export namespace stormkit::core {
using Hash32 = std::uint32_t;
Expand Down
6 changes: 5 additions & 1 deletion modules/stormkit/Core/Hash/StringHash.mpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
// This file is subject to the license terms in the LICENSE file
// found in the top-level of this distribution

module;

#include <stormkit/Core/PlatformMacro.hpp>

export module stormkit.Core:Hash.StringHash;

import std;
Expand Down Expand Up @@ -81,4 +85,4 @@ namespace stormkit::core {
-> bool {
return a.compare(b) == 0;
}
} // namespace stormkit::core
} // namespace stormkit::core
3 changes: 1 addition & 2 deletions modules/stormkit/Core/Meta/NamedType.mpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
module;

#include <stormkit/Core/MemoryMacro.hpp>

#include <stormkit/Core/HashMacro.hpp>

export module stormkit.Core:Meta.NamedType;
Expand Down Expand Up @@ -488,4 +487,4 @@ namespace stormkit::core {
constexpr auto MethodCallable::operator->(this auto&& self) -> decltype(auto) {
return std::addressof(std::forward<decltype(self)>(self).get());
}
} // namespace stormkit::core
} // namespace stormkit::core
4 changes: 4 additions & 0 deletions modules/stormkit/Core/String/Operations.mpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
// This file is subject to the license terms in the LICENSE file
// found in the top-level of this distribution

module;

#include <stormkit/Core/PlatformMacro.hpp>

export module stormkit.Core:String.Operations;

import std;
Expand Down
2 changes: 0 additions & 2 deletions modules/stormkit/Core/Utils.mpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ export import :Utils.Color;
export import :Utils.Descriptors;
export import :Utils.DeferInit;
export import :Utils.DynamicLoader;
export import :Utils.Expected;
export import :Utils.ErrorHandling;
export import :Utils.Filesystem;
export import :Utils.Functional;
Expand All @@ -25,7 +24,6 @@ export import :Utils.Monadic;
export import :Utils.NakedRef;
export import :Utils.Numerics;
export import :Utils.Pimpl;
export import :Utils.Predicates;
export import :Utils.Random;
export import :Utils.Singleton;
export import :Utils.Stacktrace;
219 changes: 0 additions & 219 deletions modules/stormkit/Core/Utils/Expected.mpp

This file was deleted.

25 changes: 17 additions & 8 deletions modules/stormkit/Core/Utils/Filesystem.mpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
// This file is subject to the license terms in the LICENSE file
// found in the top-level of this distribution

module;

#include <stormkit/Core/PlatformMacro.hpp>

export module stormkit.Core:Utils.Filesystem;

import std;
Expand Down Expand Up @@ -33,7 +37,8 @@ export namespace stormkit::core {
namespace stormkit::core {
////////////////////////////////////////
////////////////////////////////////////
STORMKIT_INLINE auto read(std::istream& stream, RangeExtent size) noexcept -> std::vector<Byte> {
STORMKIT_FORCE_INLINE auto read(std::istream& stream,
RangeExtent size) noexcept -> std::vector<Byte> {
auto output = std::vector<Byte> {};
output.resize(size);

Expand All @@ -45,7 +50,7 @@ namespace stormkit::core {
////////////////////////////////////////
////////////////////////////////////////
template<RangeExtent size>
STORMKIT_INLINE auto read(std::istream& stream) noexcept -> std::array<Byte, size> {
STORMKIT_FORCE_INLINE auto read(std::istream& stream) noexcept -> std::array<Byte, size> {
auto output = std::array<Byte, size> {};

read(stream, output);
Expand All @@ -55,19 +60,21 @@ namespace stormkit::core {

////////////////////////////////////////
////////////////////////////////////////
inline auto read(std::istream& stream, std::span<Byte> output) noexcept -> void {
STORMKIT_FORCE_INLINE auto read(std::istream& stream, std::span<Byte> output) noexcept -> void {
stream.read(std::bit_cast<char*>(std::data(output)), std::size(output));
}

////////////////////////////////////////
////////////////////////////////////////
inline auto write(std::ostream& stream, std::span<const Byte> data) noexcept -> void {
STORMKIT_FORCE_INLINE auto write(std::ostream& stream,
std::span<const Byte> data) noexcept -> void {
stream.write(std::bit_cast<const char*>(std::data(data)), std::size(data));
}

////////////////////////////////////////
////////////////////////////////////////
STORMKIT_INLINE auto readText(std::istream& stream, RangeExtent size) noexcept -> std::string {
STORMKIT_FORCE_INLINE auto readText(std::istream& stream,
RangeExtent size) noexcept -> std::string {
auto output = std::string {};
output.resize(size);

Expand All @@ -78,13 +85,15 @@ namespace stormkit::core {

////////////////////////////////////////
////////////////////////////////////////
inline auto readText(std::istream& stream, std::span<char> output) noexcept -> void {
STORMKIT_FORCE_INLINE auto readText(std::istream& stream,
std::span<char> output) noexcept -> void {
stream.read(std::data(output), std::size(output));
}

////////////////////////////////////////
////////////////////////////////////////
inline auto writeText(std::ostream& stream, std::string_view data) noexcept -> void {
STORMKIT_FORCE_INLINE auto writeText(std::ostream& stream,
std::string_view data) noexcept -> void {
stream.write(std::data(data), std::size(data));
}
} // namespace stormkit::core
} // namespace stormkit::core
Loading

0 comments on commit 7092349

Please sign in to comment.