Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions src/openvic-simulation/console/ConsoleInstance.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@

#include "openvic-simulation/types/Colour.hpp"
#include "openvic-simulation/types/Date.hpp"
#include "openvic-simulation/types/FunctionRef.hpp"
#include "openvic-simulation/types/OrderedContainers.hpp"
#include "openvic-simulation/utility/Containers.hpp"
#include "openvic-simulation/utility/Getters.hpp"
Expand All @@ -32,7 +31,7 @@ namespace OpenVic {
std::span<std::string_view> arguments;
};

using execute_command_func_t = FunctionRef<bool(Argument&)>;
using execute_command_func_t = fu2::function_view<bool(Argument&)>;

using write_func_t = fu2::function_view<void(OpenVic::colour_t, std::string_view)>;

Expand Down
11 changes: 6 additions & 5 deletions src/openvic-simulation/diplomacy/DiplomaticAction.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@

#include "openvic-simulation/country/CountryInstance.hpp"
#include "openvic-simulation/diplomacy/CountryRelation.hpp"
#include "openvic-simulation/types/FunctionRef.hpp"
#include "openvic-simulation/types/IdentifierRegistry.hpp"

#include <function2/function2.hpp>

namespace OpenVic {
struct InstanceManager;

Expand All @@ -26,9 +27,9 @@ namespace OpenVic {
std::any context_data;
};

using allowed_to_commit_func = FunctionRef<bool(Argument const&)>;
using get_acceptance_func = FunctionRef<std::int32_t(Argument const&)>;
using commit_action_func = FunctionRef<void(Argument&)>;
using allowed_to_commit_func = fu2::function_view<bool(Argument const&) const>;
using get_acceptance_func = fu2::function_view<std::int32_t(Argument const&) const>;
using commit_action_func = fu2::function_view<void(Argument&) const>;

static bool allowed_to_commit_default(Argument const& argument) {
return true;
Expand Down Expand Up @@ -61,7 +62,7 @@ namespace OpenVic {
struct CancelableDiplomaticActionType : DiplomaticActionType {
friend struct DiplomaticActionManager;

using allowed_to_cancel_func = FunctionRef<bool(Argument const&)>;
using allowed_to_cancel_func = fu2::function_view<bool(Argument const&)>;

static bool allowed_to_cancel_default(Argument const& argument) {
return true;
Expand Down
61 changes: 0 additions & 61 deletions src/openvic-simulation/types/AnyRef.hpp

This file was deleted.

116 changes: 0 additions & 116 deletions src/openvic-simulation/types/FunctionRef.hpp

This file was deleted.