Minor fixes/additions to MapNode and MapConfig

classic Classic list List threaded Threaded
2 messages Options
Evan Andersen Evan Andersen
Reply | Threaded
Open this post in threaded view
|

Minor fixes/additions to MapNode and MapConfig

I've made a few minor changes that I want to post in case you'd like to add them in.  

The first is just to make the constructor of MapNode take a const reference to a MapConfig instead of the non-const reference it is using now.  Since all that constructor does with the MapConfig reference is to create a copy of it, it seems better to use a const reference.

The second change is to add on overload for the assignment operator in the MapConfig class.  Without the overload, copying a MapConfig using the assignment operator causes a crash when the MapConfig's mutex is copied.  To fix this I just made the assignment operator do the same thing as the copy constructor that is already there.

I have attached the modified files below.

-Evan

MapNode
MapNode.cpp
MapConfig
MapConfig.cpp
jasonbeverage jasonbeverage
Reply | Threaded
Open this post in threaded view
|

Re: Minor fixes/additions to MapNode and MapConfig

Hey Evan,

Changes look good to me and have been applied to the trunk!

Thanks,

Jason

On Wed, Jul 22, 2009 at 2:32 PM, Evan Andersen (via Nabble) <[hidden email]> wrote:
I've made a few minor changes that I want to post in case you'd like to add them in.  

The first is just to make the constructor of MapNode take a const reference to a MapConfig instead of the non-const reference it is using now.  Since all that constructor does with the MapConfig reference is to create a copy of it, it seems better to use a const reference.

The second change is to add on overload for the assignment operator in the MapConfig class.  Without the overload, copying a MapConfig using the assignment operator causes a crash when the MapConfig's mutex is copied.  To fix this I just made the assignment operator do the same thing as the copy constructor that is already there.

I have attached the modified files below.

-Evan

MapNode
MapNode.cpp
MapConfig
MapConfig.cpp


View message @ http://n2.nabble.com/Minor-fixes-additions-to-MapNode-and-MapConfig-tp3305004p3305004.html
To start a new topic under osgEarth, email [hidden email]
To unsubscribe from osgEarth, click here.