mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-10-10 09:28:06 +00:00
switch to unique_ptrs for callback timers
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
#include "EntityCallbackTimer.h"
|
||||
|
||||
EntityCallbackTimer::EntityCallbackTimer(float time, std::function<void()> callback) {
|
||||
EntityCallbackTimer::EntityCallbackTimer(const float& time, const std::function<void()>& callback) {
|
||||
m_Time = time;
|
||||
m_Callback = callback;
|
||||
}
|
||||
|
@@ -5,7 +5,7 @@
|
||||
|
||||
class EntityCallbackTimer {
|
||||
public:
|
||||
EntityCallbackTimer(float time, std::function<void()> callback);
|
||||
EntityCallbackTimer(const float& time, const std::function<void()>& callback);
|
||||
~EntityCallbackTimer();
|
||||
|
||||
void ExecuteCallback();
|
||||
|
@@ -1,6 +1,6 @@
|
||||
#include "EntityTimer.h"
|
||||
|
||||
EntityTimer::EntityTimer(std::string name, float time) {
|
||||
EntityTimer::EntityTimer(const std::string& name, const float& time) {
|
||||
m_Name = name;
|
||||
m_Time = time;
|
||||
}
|
||||
|
@@ -4,7 +4,7 @@
|
||||
|
||||
class EntityTimer {
|
||||
public:
|
||||
EntityTimer(std::string name, float time);
|
||||
EntityTimer(const std::string& name, const float& time);
|
||||
~EntityTimer();
|
||||
|
||||
std::string GetName();
|
||||
|
Reference in New Issue
Block a user