summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2024-04-14 07:56:27 +0200
committerStanislaw Halik <sthalik@misaki.pl>2024-04-14 07:56:27 +0200
commitc8ae1f808a16d664ec229ca3a2237ac39bf1164d (patch)
tree52ff9c688501d552f9b33e48b18ab96d2f92efce
parenta63b97f06cbe4286f3617db24b9cf2490c62b2b9 (diff)
remove obsolete code
Now that `find_object` isn't defined in the header anymore, it doesn't make sense to fiddle around with dependent names.
-rw-r--r--src/world.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/world.cpp b/src/world.cpp
index 572fe8aa..9f7c0cc3 100644
--- a/src/world.cpp
+++ b/src/world.cpp
@@ -281,9 +281,7 @@ template<typename T>
std::shared_ptr<T> world::find_object(object_id id)
{
static_assert(std::is_base_of_v<object, T>);
- // make it a dependent name so that including "src/object.hpp" isn't needed
- using U = std::conditional_t<std::is_same_v<T, object>, T, object>;
- if (std::shared_ptr<U> ptr = find_object_(id); !ptr)
+ if (std::shared_ptr<object> ptr = find_object_(id); !ptr)
return {};
else if constexpr(std::is_same_v<T, object>)
return ptr;