mirror of
				https://github.com/ciphervance/supercell-wx.git
				synced 2025-10-31 00: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>") |     target_compile_options(supercell-wx PRIVATE "$<$<CONFIG:Release>:-g>") | ||||||
| endif() | 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 | target_link_libraries(scwx-qt PUBLIC Qt${QT_VERSION_MAJOR}::Widgets | ||||||
|                                      Qt${QT_VERSION_MAJOR}::OpenGLWidgets |                                      Qt${QT_VERSION_MAJOR}::OpenGLWidgets | ||||||
|                                      Qt${QT_VERSION_MAJOR}::Multimedia |                                      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 |                                      Qt${QT_VERSION_MAJOR}::Svg | ||||||
|                                      Boost::json |                                      Boost::json | ||||||
|                                      Boost::timer |                                      Boost::timer | ||||||
|  |                                      Boost::atomic | ||||||
|                                      QMapLibre::Core |                                      QMapLibre::Core | ||||||
|                                      $<$<CXX_COMPILER_ID:MSVC>:opengl32> |                                      $<$<CXX_COMPILER_ID:MSVC>:opengl32> | ||||||
|                                      $<$<CXX_COMPILER_ID:MSVC>:SetupAPI> |                                      $<$<CXX_COMPILER_ID:MSVC>:SetupAPI> | ||||||
|  |  | ||||||
|  | @ -1,6 +1,6 @@ | ||||||
| #include <scwx/qt/util/queue_counter.hpp> | #include <scwx/qt/util/queue_counter.hpp> | ||||||
| 
 | 
 | ||||||
| #include <atomic> | #include <boost/atomic/atomic.hpp> | ||||||
| 
 | 
 | ||||||
| namespace scwx::qt::util | namespace scwx::qt::util | ||||||
| { | { | ||||||
|  | @ -11,7 +11,7 @@ public: | ||||||
|    explicit Impl(size_t maxCount) : maxCount_ {maxCount} {} |    explicit Impl(size_t maxCount) : maxCount_ {maxCount} {} | ||||||
| 
 | 
 | ||||||
|    const size_t          maxCount_; |    const size_t          maxCount_; | ||||||
|    std::atomic<size_t> count_ {0}; |    boost::atomic<size_t> count_ {0}; | ||||||
| }; | }; | ||||||
| 
 | 
 | ||||||
| QueueCounter::QueueCounter(size_t maxCount) : | QueueCounter::QueueCounter(size_t maxCount) : | ||||||
|  |  | ||||||
|  | @ -1,7 +1,7 @@ | ||||||
| #pragma once | #pragma once | ||||||
| 
 | 
 | ||||||
| #include <memory> | #include <memory> | ||||||
| #include <atomic> | #include <boost/atomic/atomic.hpp> | ||||||
| 
 | 
 | ||||||
| namespace scwx::qt::util | namespace scwx::qt::util | ||||||
| { | { | ||||||
|  | @ -54,7 +54,7 @@ public: | ||||||
|     * otherwise |     * otherwise | ||||||
|     */ |     */ | ||||||
|    static constexpr bool is_always_lock_free = |    static constexpr bool is_always_lock_free = | ||||||
|       std::atomic<size_t>::is_always_lock_free; |       boost::atomic<size_t>::is_always_lock_free; | ||||||
| 
 | 
 | ||||||
| private: | private: | ||||||
|    class Impl; |    class Impl; | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 AdenKoperczak
						AdenKoperczak