mirror of
				https://github.com/ciphervance/supercell-wx.git
				synced 2025-10-31 15:50:05 +00:00 
			
		
		
		
	USe a common default geodesic object instead of duplicate copies.
All used functions are constant, and don't require unique instantiations for thread safety.
This commit is contained in:
		
							parent
							
								
									4a31cf6d3e
								
							
						
					
					
						commit
						90c8c0183a
					
				
					 10 changed files with 89 additions and 47 deletions
				
			
		|  | @ -1,4 +1,5 @@ | |||
| #include <scwx/qt/gl/draw/geo_line.hpp> | ||||
| #include <scwx/qt/util/geographic_lib.hpp> | ||||
| #include <scwx/qt/util/texture_atlas.hpp> | ||||
| #include <scwx/common/geographic.hpp> | ||||
| #include <scwx/util/logger.hpp> | ||||
|  | @ -6,8 +7,6 @@ | |||
| #include <numbers> | ||||
| #include <optional> | ||||
| 
 | ||||
| #include <GeographicLib/Geodesic.hpp> | ||||
| 
 | ||||
| namespace scwx | ||||
| { | ||||
| namespace qt | ||||
|  | @ -33,8 +32,7 @@ class GeoLine::Impl | |||
| public: | ||||
|    explicit Impl(std::shared_ptr<GlContext> context) : | ||||
|        context_ {context}, | ||||
|        geodesic_(GeographicLib::Constants::WGS84_a(), | ||||
|                  GeographicLib::Constants::WGS84_f()), | ||||
|        geodesic_ {util::GeographicLib::DefaultGeodesic()}, | ||||
|        dirty_ {false}, | ||||
|        visible_ {true}, | ||||
|        points_ {}, | ||||
|  | @ -55,7 +53,7 @@ public: | |||
| 
 | ||||
|    std::shared_ptr<GlContext> context_; | ||||
| 
 | ||||
|    GeographicLib::Geodesic geodesic_; | ||||
|    const GeographicLib::Geodesic& geodesic_; | ||||
| 
 | ||||
|    bool dirty_; | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Dan Paulat
						Dan Paulat