1 From b69573f50496f9cdcad2bff5e5e25bf1ecea94e6 Mon Sep 17 00:00:00 2001
2 From: gwaldron <gwaldron@gmail.com>
3 Date: Mon, 17 Oct 2016 08:04:31 -0400
4 Subject: [PATCH] Removed/patched deprecated called to osg::Referenced
5 thread-safe reference counting
8 src/osgEarth/Locators.cpp | 4 ++--
9 src/osgEarth/Registry.cpp | 3 +++
10 src/osgEarth/TileSource.cpp | 2 --
11 3 files changed, 5 insertions(+), 4 deletions(-)
13 diff --git a/src/osgEarth/Locators.cpp b/src/osgEarth/Locators.cpp
14 index fb3e825..fcb780c 100644
15 --- a/src/osgEarth/Locators.cpp
16 +++ b/src/osgEarth/Locators.cpp
17 @@ -29,7 +29,7 @@ _inverseCalculated(false),
21 - this->setThreadSafeRefUnref(true);
25 GeoLocator::GeoLocator( const GeoExtent& dataExtent ) :
26 @@ -38,7 +38,7 @@ _dataExtent( dataExtent ),
30 - this->setThreadSafeRefUnref(true);
34 GeoLocator::GeoLocator( const osgTerrain::Locator& prototype, const GeoExtent& dataExtent ) :
35 diff --git a/src/osgEarth/Registry.cpp b/src/osgEarth/Registry.cpp
36 index 32a9439..bf95e87 100644
37 --- a/src/osgEarth/Registry.cpp
38 +++ b/src/osgEarth/Registry.cpp
39 @@ -694,7 +694,10 @@ class RegisterEarthTileExtension
41 RegisterEarthTileExtension()
43 +#if OSG_VERSION_LESS_THAN(3,5,4)
44 + // Method deprecated beyone 3.5.4 since all ref counting is thread-safe by default
45 osg::Referenced::setThreadSafeReferenceCounting( true );
47 osgDB::Registry::instance()->addFileExtensionAlias("earth_tile", "earth");
50 diff --git a/src/osgEarth/TileSource.cpp b/src/osgEarth/TileSource.cpp
51 index fcdf2b8..28c6f61 100644
52 --- a/src/osgEarth/TileSource.cpp
53 +++ b/src/osgEarth/TileSource.cpp
54 @@ -218,8 +218,6 @@ _status ( Status::Error("Not initialized") ),
58 - this->setThreadSafeRefUnref( true );
60 // Initialize the l2 cache size to the options.
61 int l2CacheSize = *options.L2CacheSize();