parent
d7931a28ce
commit
a89b9f6158
@ -18,13 +18,17 @@
|
|||||||
#ifndef SGSphere_H
|
#ifndef SGSphere_H
|
||||||
#define SGSphere_H
|
#define SGSphere_H
|
||||||
|
|
||||||
#ifndef _MSC_VER
|
|
||||||
# pragma GCC diagnostic ignored "-Wuninitialized" SGSphere();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
template<typename T>
|
template<typename T>
|
||||||
class SGSphere {
|
class SGSphere {
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
#ifdef __GNUC__
|
||||||
|
// Avoid "_center not initialized" warnings.
|
||||||
|
# pragma GCC diagnostic push
|
||||||
|
# pragma GCC diagnostic ignored "-Wuninitialized"
|
||||||
|
#endif
|
||||||
|
|
||||||
SGSphere() :
|
SGSphere() :
|
||||||
/*
|
/*
|
||||||
* Do not initialize _center to save unneeded initialization time.
|
* Do not initialize _center to save unneeded initialization time.
|
||||||
@ -43,6 +47,11 @@ public:
|
|||||||
_radius(sphere.getRadius())
|
_radius(sphere.getRadius())
|
||||||
{ }
|
{ }
|
||||||
|
|
||||||
|
#ifdef __GNUC__
|
||||||
|
// Restore warning settings.
|
||||||
|
# pragma GCC diagnostic pop
|
||||||
|
#endif
|
||||||
|
|
||||||
const SGVec3<T>& getCenter() const
|
const SGVec3<T>& getCenter() const
|
||||||
{ return _center; }
|
{ return _center; }
|
||||||
void setCenter(const SGVec3<T>& center)
|
void setCenter(const SGVec3<T>& center)
|
||||||
|
Loading…
Reference in New Issue
Block a user