summaryrefslogtreecommitdiffstats
path: root/game
diff options
context:
space:
mode:
Diffstat (limited to 'game')
-rw-r--r--game/client/chunk_mesher.cc7
-rw-r--r--game/shared/threading.cc2
-rw-r--r--game/shared/threading.hh8
3 files changed, 7 insertions, 10 deletions
diff --git a/game/client/chunk_mesher.cc b/game/client/chunk_mesher.cc
index 011d6a7..7e185f1 100644
--- a/game/client/chunk_mesher.cc
+++ b/game/client/chunk_mesher.cc
@@ -161,13 +161,6 @@ void GL_MeshingTask::finalize(void)
return;
}
- if(m_status == task_status::CANCELLED) {
- // The task has been cancelled, the result
- // should be invalidated, if the code even got
- // to this point (it normally should not)
- return;
- }
-
auto &component = globals::dimension->chunks.emplace_or_replace<ChunkMeshComponent>(m_entity);
const std::size_t plane_count_nb = m_quads_s.size();
diff --git a/game/shared/threading.cc b/game/shared/threading.cc
index 7e6f652..71c30e1 100644
--- a/game/shared/threading.cc
+++ b/game/shared/threading.cc
@@ -99,7 +99,7 @@ void threading::update(void)
}
}
-void threading::submit(Task *task)
+void threading::detail::submit_new(Task *task)
{
task->set_status(task_status::ENQUEUED);
diff --git a/game/shared/threading.hh b/game/shared/threading.hh
index e143f4f..083ccbf 100644
--- a/game/shared/threading.hh
+++ b/game/shared/threading.hh
@@ -28,9 +28,13 @@ namespace threading
void init(void);
void deinit(void);
void update(void);
-void submit(Task *task);
} // namespace threading
+namespace threading::detail
+{
+void submit_new(Task *task);
+} // namespace threading::detail
+
namespace threading
{
template<typename T, typename... AT>
@@ -40,7 +44,7 @@ void submit(AT &&... args);
template<typename T, typename... AT>
inline void threading::submit(AT &&... args)
{
- threading::submit(new T(args...));
+ threading::detail::submit_new(new T(args...));
}
#endif /* SHARED_THREADING_HH */