mirror of
https://github.com/ciphervance/supercell-wx.git
synced 2025-10-30 12:30:05 +00:00
Use boost::atomic for max_time_step_queue_size, for easier linking
This commit is contained in:
parent
b4694d637b
commit
9f5c126b7f
3 changed files with 6 additions and 10 deletions
|
|
@ -686,11 +686,6 @@ else()
|
|||
target_compile_options(supercell-wx PRIVATE "$<$<CONFIG:Release>:-g>")
|
||||
endif()
|
||||
|
||||
# link atomic only for Linux
|
||||
if (!MSVC)
|
||||
target_link_libraries(scwx-qt PUBLIC atomic)
|
||||
endif()
|
||||
|
||||
target_link_libraries(scwx-qt PUBLIC Qt${QT_VERSION_MAJOR}::Widgets
|
||||
Qt${QT_VERSION_MAJOR}::OpenGLWidgets
|
||||
Qt${QT_VERSION_MAJOR}::Multimedia
|
||||
|
|
@ -699,6 +694,7 @@ target_link_libraries(scwx-qt PUBLIC Qt${QT_VERSION_MAJOR}::Widgets
|
|||
Qt${QT_VERSION_MAJOR}::Svg
|
||||
Boost::json
|
||||
Boost::timer
|
||||
Boost::atomic
|
||||
QMapLibre::Core
|
||||
$<$<CXX_COMPILER_ID:MSVC>:opengl32>
|
||||
$<$<CXX_COMPILER_ID:MSVC>:SetupAPI>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
#include <scwx/qt/util/queue_counter.hpp>
|
||||
|
||||
#include <atomic>
|
||||
#include <boost/atomic/atomic.hpp>
|
||||
|
||||
namespace scwx::qt::util
|
||||
{
|
||||
|
|
@ -10,8 +10,8 @@ class QueueCounter::Impl
|
|||
public:
|
||||
explicit Impl(size_t maxCount) : maxCount_ {maxCount} {}
|
||||
|
||||
const size_t maxCount_;
|
||||
std::atomic<size_t> count_ {0};
|
||||
const size_t maxCount_;
|
||||
boost::atomic<size_t> count_ {0};
|
||||
};
|
||||
|
||||
QueueCounter::QueueCounter(size_t maxCount) :
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <atomic>
|
||||
#include <boost/atomic/atomic.hpp>
|
||||
|
||||
namespace scwx::qt::util
|
||||
{
|
||||
|
|
@ -54,7 +54,7 @@ public:
|
|||
* otherwise
|
||||
*/
|
||||
static constexpr bool is_always_lock_free =
|
||||
std::atomic<size_t>::is_always_lock_free;
|
||||
boost::atomic<size_t>::is_always_lock_free;
|
||||
|
||||
private:
|
||||
class Impl;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue