Fixed warnings
This commit is contained in:
@@ -2110,7 +2110,10 @@ class AttributeFunctorArrayVisitor : public ArrayVisitor
|
||||
array->accept(*this);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
AttributeFunctorArrayVisitor& operator = (const AttributeFunctorArrayVisitor&) { return *this; }
|
||||
Drawable::AttributeFunctor& _af;
|
||||
Drawable::AttributeType _type;
|
||||
};
|
||||
@@ -2171,6 +2174,10 @@ class ConstAttributeFunctorArrayVisitor : public ConstArrayVisitor
|
||||
}
|
||||
}
|
||||
|
||||
protected:
|
||||
|
||||
ConstAttributeFunctorArrayVisitor& operator = (const ConstAttributeFunctorArrayVisitor&) { return *this; }
|
||||
|
||||
Drawable::ConstAttributeFunctor& _af;
|
||||
Drawable::AttributeType _type;
|
||||
};
|
||||
@@ -2944,7 +2951,8 @@ class ExpandIndexedArray : public osg::ConstArrayVisitor
|
||||
// the input array, but the interface of the osg::Array class doesn't include a way
|
||||
// to set an element.
|
||||
template <class T>
|
||||
osg::Array* create_noinline(const osg::Array& array, const osg::IndexArray& indices) {
|
||||
osg::Array* create_noinline(const osg::Array& array, const osg::IndexArray& indices)
|
||||
{
|
||||
T* newArray = 0;
|
||||
typedef typename T::ElementDataType EDT;
|
||||
|
||||
@@ -2961,42 +2969,44 @@ class ExpandIndexedArray : public osg::ConstArrayVisitor
|
||||
return newArray;
|
||||
}
|
||||
|
||||
osg::Array* create_noinline(const osg::Array& array, const osg::IndexArray& indices) {
|
||||
switch (array.getType())
|
||||
osg::Array* create_noinline(const osg::Array& array, const osg::IndexArray& indices)
|
||||
{
|
||||
switch (array.getType())
|
||||
{
|
||||
case(osg::Array::ByteArrayType): return create_noinline<osg::ByteArray>(array,indices);
|
||||
case(osg::Array::ShortArrayType): return create_noinline<osg::ShortArray>(array,indices);
|
||||
case(osg::Array::IntArrayType): return create_noinline<osg::IntArray>(array,indices);
|
||||
case(osg::Array::UByteArrayType): return create_noinline<osg::UByteArray>(array,indices);
|
||||
case(osg::Array::UShortArrayType): return create_noinline<osg::UShortArray>(array,indices);
|
||||
case(osg::Array::UIntArrayType): return create_noinline<osg::UIntArray>(array,indices);
|
||||
case(osg::Array::Vec4ubArrayType): return create_noinline<osg::Vec4ubArray>(array,indices);
|
||||
case(osg::Array::FloatArrayType): return create_noinline<osg::FloatArray>(array,indices);
|
||||
case(osg::Array::Vec2ArrayType): return create_noinline<osg::Vec2Array>(array,indices);
|
||||
case(osg::Array::Vec3ArrayType): return create_noinline<osg::Vec3Array>(array,indices);
|
||||
case(osg::Array::Vec4ArrayType): return create_noinline<osg::Vec4Array>(array,indices);
|
||||
case(osg::Array::Vec2dArrayType): return create_noinline<osg::Vec2dArray>(array,indices);
|
||||
case(osg::Array::Vec3dArrayType): return create_noinline<osg::Vec3dArray>(array,indices);
|
||||
case(osg::Array::Vec4dArrayType): return create_noinline<osg::Vec4dArray>(array,indices);
|
||||
default:
|
||||
return NULL;
|
||||
case(osg::Array::ByteArrayType): return create_noinline<osg::ByteArray>(array,indices);
|
||||
case(osg::Array::ShortArrayType): return create_noinline<osg::ShortArray>(array,indices);
|
||||
case(osg::Array::IntArrayType): return create_noinline<osg::IntArray>(array,indices);
|
||||
case(osg::Array::UByteArrayType): return create_noinline<osg::UByteArray>(array,indices);
|
||||
case(osg::Array::UShortArrayType): return create_noinline<osg::UShortArray>(array,indices);
|
||||
case(osg::Array::UIntArrayType): return create_noinline<osg::UIntArray>(array,indices);
|
||||
case(osg::Array::Vec4ubArrayType): return create_noinline<osg::Vec4ubArray>(array,indices);
|
||||
case(osg::Array::FloatArrayType): return create_noinline<osg::FloatArray>(array,indices);
|
||||
case(osg::Array::Vec2ArrayType): return create_noinline<osg::Vec2Array>(array,indices);
|
||||
case(osg::Array::Vec3ArrayType): return create_noinline<osg::Vec3Array>(array,indices);
|
||||
case(osg::Array::Vec4ArrayType): return create_noinline<osg::Vec4Array>(array,indices);
|
||||
case(osg::Array::Vec2dArrayType): return create_noinline<osg::Vec2dArray>(array,indices);
|
||||
case(osg::Array::Vec3dArrayType): return create_noinline<osg::Vec3dArray>(array,indices);
|
||||
case(osg::Array::Vec4dArrayType): return create_noinline<osg::Vec4dArray>(array,indices);
|
||||
default:
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
template <class TA, class TI>
|
||||
osg::Array* create(const TA& array, const osg::IndexArray& indices) {
|
||||
// We know that indices.getType returned the same thing as TI, but
|
||||
// we need to determine whether it is really an instance of TI, or
|
||||
// perhaps another subclass of osg::Array that contains the same
|
||||
// type of data.
|
||||
const TI* ba(dynamic_cast<const TI*>(&indices));
|
||||
if (ba != NULL) {
|
||||
return create_inline(array,*ba);
|
||||
osg::Array* create(const TA& array, const osg::IndexArray& indices)
|
||||
{
|
||||
// We know that indices.getType returned the same thing as TI, but
|
||||
// we need to determine whether it is really an instance of TI, or
|
||||
// perhaps another subclass of osg::Array that contains the same
|
||||
// type of data.
|
||||
const TI* ba(dynamic_cast<const TI*>(&indices));
|
||||
if (ba != NULL) {
|
||||
return create_inline(array,*ba);
|
||||
}
|
||||
else {
|
||||
return create_noinline(array, _indices);
|
||||
}
|
||||
}
|
||||
else {
|
||||
return create_noinline(array, _indices);
|
||||
}
|
||||
}
|
||||
|
||||
template <class T>
|
||||
osg::Array* create(const T& array)
|
||||
@@ -3009,8 +3019,7 @@ class ExpandIndexedArray : public osg::ConstArrayVisitor
|
||||
case(osg::Array::UByteArrayType): return create<T, osg::UByteArray>(array, _indices);
|
||||
case(osg::Array::UShortArrayType): return create<T, osg::UShortArray>(array, _indices);
|
||||
case(osg::Array::UIntArrayType): return create<T, osg::UIntArray>(array, _indices);
|
||||
default:
|
||||
return create_noinline(array, _indices);
|
||||
default: return create_noinline(array, _indices);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -3033,6 +3042,11 @@ class ExpandIndexedArray : public osg::ConstArrayVisitor
|
||||
|
||||
const osg::IndexArray& _indices;
|
||||
osg::Array* _targetArray;
|
||||
|
||||
protected:
|
||||
|
||||
ExpandIndexedArray& operator = (const ExpandIndexedArray&) { return *this; }
|
||||
|
||||
};
|
||||
|
||||
bool Geometry::suitableForOptimization() const
|
||||
|
||||
@@ -61,7 +61,7 @@ void BarrierOperation::release()
|
||||
Barrier::release();
|
||||
}
|
||||
|
||||
void BarrierOperation::operator () (Object* object)
|
||||
void BarrierOperation::operator () (Object* /*object*/)
|
||||
{
|
||||
if (_preBlockOp!=NO_OPERATION)
|
||||
{
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
using namespace osg;
|
||||
|
||||
void Hint::apply(State& state) const
|
||||
void Hint::apply(State& /*state*/) const
|
||||
{
|
||||
if (_target==GL_NONE || _mode==GL_NONE) return;
|
||||
|
||||
|
||||
@@ -48,6 +48,9 @@ struct BuildKdTree
|
||||
Indices _primitiveIndices;
|
||||
CenterList _centers;
|
||||
|
||||
protected:
|
||||
|
||||
BuildKdTree& operator = (const BuildKdTree&) { return *this; }
|
||||
};
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
@@ -464,6 +467,11 @@ struct IntersectKdTree
|
||||
osg::Vec3 _d_invX;
|
||||
osg::Vec3 _d_invY;
|
||||
osg::Vec3 _d_invZ;
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
IntersectKdTree& operator = (const IntersectKdTree&) { return *this; }
|
||||
};
|
||||
|
||||
|
||||
@@ -743,7 +751,10 @@ KdTree::KdTree()
|
||||
}
|
||||
|
||||
KdTree::KdTree(const KdTree& rhs, const osg::CopyOp& copyop):
|
||||
Shape(rhs)
|
||||
Shape(rhs, copyop),
|
||||
_vertices(rhs._vertices),
|
||||
_kdNodes(rhs._kdNodes),
|
||||
_triangles(rhs._triangles)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -467,7 +467,7 @@ namespace MatrixDecomposition
|
||||
}
|
||||
if (turn>=0) {
|
||||
Quat qtoz, qp;
|
||||
unsigned neg[3], win;
|
||||
unsigned int win;
|
||||
double mag[3], t;
|
||||
switch (turn) {
|
||||
default: return (Qt_Conj(q));
|
||||
@@ -480,11 +480,12 @@ namespace MatrixDecomposition
|
||||
mag[1] = (double)q.x*q.z-(double)q.y*q.w;
|
||||
mag[2] = (double)q.y*q.z+(double)q.x*q.w;
|
||||
|
||||
for (i=0; i<3; i++)
|
||||
//JVK??????
|
||||
//if (neg[i] = (mag[i]<0.0))
|
||||
if (neg[i] == (mag[i]<0.0))
|
||||
mag[i] = -mag[i];
|
||||
bool neg[3];
|
||||
for (i=0; i<3; i++)
|
||||
{
|
||||
neg[i] = (mag[i]<0.0);
|
||||
if (neg[i]) mag[i] = -mag[i];
|
||||
}
|
||||
|
||||
if (mag[0]>mag[1]) {
|
||||
if (mag[0]>mag[2])
|
||||
@@ -509,13 +510,15 @@ namespace MatrixDecomposition
|
||||
}
|
||||
else {
|
||||
double qa[4], pa[4];
|
||||
unsigned lo, hi, neg[4], par = 0;
|
||||
unsigned int lo, hi;
|
||||
bool par = false;
|
||||
bool neg[4];
|
||||
double all, big, two;
|
||||
qa[0] = q.x; qa[1] = q.y; qa[2] = q.z; qa[3] = q.w;
|
||||
for (i=0; i<4; i++) {
|
||||
pa[i] = 0.0;
|
||||
//if (neg[i] = (qa[i]<0.0)) qa[i] = -qa[i];
|
||||
if (neg[i] == (qa[i]<0.0)) qa[i] = -qa[i];
|
||||
neg[i] = (qa[i]<0.0);
|
||||
if (neg[i]) qa[i] = -qa[i];
|
||||
par ^= neg[i];
|
||||
}
|
||||
|
||||
|
||||
@@ -299,7 +299,7 @@ struct ClearQueriesCallback : public osg::Camera::DrawCallback
|
||||
ClearQueriesCallback( const ClearQueriesCallback&, const osg::CopyOp& ) {}
|
||||
META_Object( osgOQ, ClearQueriesCallback )
|
||||
|
||||
virtual void operator() (const osg::Camera& camera) const
|
||||
virtual void operator() (const osg::Camera&) const
|
||||
{
|
||||
if (!_rqcb)
|
||||
{
|
||||
|
||||
@@ -1879,6 +1879,10 @@ public:
|
||||
|
||||
DatabasePager::PagedLODList& _activePagedLODList;
|
||||
int _frameNumber;
|
||||
|
||||
protected:
|
||||
|
||||
FindPagedLODsVisitor& operator = (const FindPagedLODsVisitor&) { return *this; }
|
||||
};
|
||||
|
||||
void DatabasePager::registerPagedLODs(osg::Node* subgraph, int frameNumber)
|
||||
|
||||
@@ -294,7 +294,7 @@ osg::Image* ImagePager::readImageFile(const std::string& fileName)
|
||||
return osgDB::readImageFile(fileName);
|
||||
}
|
||||
|
||||
void ImagePager::requestImageFile(const std::string& fileName,osg::Object* attachmentPoint, int attachmentIndex, double timeToMergeBy, const osg::FrameStamp* framestamp)
|
||||
void ImagePager::requestImageFile(const std::string& fileName,osg::Object* attachmentPoint, int attachmentIndex, double timeToMergeBy, const osg::FrameStamp*)
|
||||
{
|
||||
osg::notify(osg::INFO)<<"ImagePager::requestNodeFile("<<fileName<<")"<<std::endl;
|
||||
|
||||
@@ -333,7 +333,7 @@ bool ImagePager::requiresUpdateSceneGraph() const
|
||||
return !(_completedQueue->_requestList.empty());
|
||||
}
|
||||
|
||||
void ImagePager::updateSceneGraph(const osg::FrameStamp &frameStamp)
|
||||
void ImagePager::updateSceneGraph(const osg::FrameStamp&)
|
||||
{
|
||||
OpenThreads::ScopedLock<OpenThreads::Mutex> lock(_completedQueue->_requestMutex);
|
||||
|
||||
|
||||
@@ -82,6 +82,8 @@ public:
|
||||
|
||||
protected:
|
||||
|
||||
AvailableReaderWriterIterator& operator = (const AvailableReaderWriterIterator&) { return *this; }
|
||||
|
||||
Registry::ReaderWriterList& _rwList;
|
||||
OpenThreads::ReentrantMutex& _pluginMutex;
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ void CameraViewSwitchManipulator::getUsage(osg::ApplicationUsage& usage) const
|
||||
usage.addKeyboardMouseBinding("CameraViewSwitcher: ]","Increase current camera number");
|
||||
}
|
||||
|
||||
bool CameraViewSwitchManipulator::handle(const GUIEventAdapter& ea,GUIActionAdapter& us)
|
||||
bool CameraViewSwitchManipulator::handle(const GUIEventAdapter& ea,GUIActionAdapter&)
|
||||
{
|
||||
if (ea.getHandled()) return false;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user