aboutsummaryrefslogtreecommitdiff
path: root/src/common/Utilities
diff options
context:
space:
mode:
Diffstat (limited to 'src/common/Utilities')
-rw-r--r--src/common/Utilities/Optional.h8
-rw-r--r--src/common/Utilities/OptionalFwd.h31
-rw-r--r--src/common/Utilities/TaskScheduler.cpp2
-rw-r--r--src/common/Utilities/TaskScheduler.h3
4 files changed, 8 insertions, 36 deletions
diff --git a/src/common/Utilities/Optional.h b/src/common/Utilities/Optional.h
index dc5cd970970..55b9675fc59 100644
--- a/src/common/Utilities/Optional.h
+++ b/src/common/Utilities/Optional.h
@@ -18,8 +18,10 @@
#ifndef TrinityCore_Optional_h__
#define TrinityCore_Optional_h__
-#include "OptionalFwd.h"
-#include <boost/optional.hpp>
-#include <boost/utility/in_place_factory.hpp>
+#include <optional>
+
+//! Optional helper class to wrap optional values within.
+template <class T>
+using Optional = std::optional<T>;
#endif // TrinityCore_Optional_h__
diff --git a/src/common/Utilities/OptionalFwd.h b/src/common/Utilities/OptionalFwd.h
deleted file mode 100644
index 516ebeb772e..00000000000
--- a/src/common/Utilities/OptionalFwd.h
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * This file is part of the TrinityCore Project. See AUTHORS file for Copyright information
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the
- * Free Software Foundation; either version 2 of the License, or (at your
- * option) any later version.
- *
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#ifndef OptionalFwd_h__
-#define OptionalFwd_h__
-
-namespace boost
-{
- template <class T>
- class optional;
-}
-
-//! Optional helper class to wrap optional values within.
-template <class T>
-using Optional = boost::optional<T>;
-
-#endif // OptionalFwd_h__
diff --git a/src/common/Utilities/TaskScheduler.cpp b/src/common/Utilities/TaskScheduler.cpp
index 8b04a060cf3..4874885eed6 100644
--- a/src/common/Utilities/TaskScheduler.cpp
+++ b/src/common/Utilities/TaskScheduler.cpp
@@ -188,7 +188,7 @@ TaskContext& TaskContext::SetGroup(TaskScheduler::group_t const group)
TaskContext& TaskContext::ClearGroup()
{
- _task->_group = boost::none;
+ _task->_group = std::nullopt;
return *this;
}
diff --git a/src/common/Utilities/TaskScheduler.h b/src/common/Utilities/TaskScheduler.h
index 9d5eabd94e2..da80d02be88 100644
--- a/src/common/Utilities/TaskScheduler.h
+++ b/src/common/Utilities/TaskScheduler.h
@@ -23,6 +23,7 @@
#include "Random.h"
#include <algorithm>
#include <chrono>
+#include <functional>
#include <vector>
#include <queue>
#include <memory>
@@ -83,7 +84,7 @@ class TC_COMMON_API TaskScheduler
// Minimal Argument construct
Task(timepoint_t const& end, duration_t const& duration, task_handler_t const& task)
- : _end(end), _duration(duration), _group(boost::none), _repeated(0), _task(task) { }
+ : _end(end), _duration(duration), _group(std::nullopt), _repeated(0), _task(task) { }
// Copy construct
Task(Task const&) = delete;