From 76e61d68bbf568ec0d7fc4632e52d4de5496b003 Mon Sep 17 00:00:00 2001 From: Loek Le Blansch Date: Fri, 18 Oct 2024 15:43:25 +0200 Subject: (1/2) rename --- TileBehavior.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'TileBehavior.cpp') diff --git a/TileBehavior.cpp b/TileBehavior.cpp index 6cabd40..99301ac 100644 --- a/TileBehavior.cpp +++ b/TileBehavior.cpp @@ -1,10 +1,10 @@ -#include "TileBehavior.h" +#include "TileBehaviorFactory.h" #include "Exception.h" using namespace std; -TileBehaviorStrategy & TileBehavior::get_strategy(string type) { - auto & type_map = TileBehavior::get_collection(); +TileBehavior & TileBehaviorFactory::get_strategy(string type) { + auto & type_map = TileBehaviorFactory::get_collection(); if (type_map.contains(type)) return *type_map.at(type); @@ -12,8 +12,8 @@ TileBehaviorStrategy & TileBehavior::get_strategy(string type) { throw Exception("unknown behavior for tile type \"%s\"", type.c_str()); } -void TileBehavior::register_strategy(string type, TileBehaviorStrategy * strategy) { - auto & type_map = TileBehavior::get_collection(); +void TileBehaviorFactory::register_strategy(string type, TileBehavior * strategy) { + auto & type_map = TileBehaviorFactory::get_collection(); type_map[type] = strategy; } -- cgit v1.2.3