Warning fixes
This commit is contained in:
parent
e40102c954
commit
cd5fa24696
@ -214,7 +214,7 @@ void DataConverter::read(CameraPacket& cameraPacket)
|
||||
_swapBytes = !_swapBytes;
|
||||
}
|
||||
|
||||
cameraPacket._masterKilled = readUInt();
|
||||
cameraPacket._masterKilled = bool(readUInt());
|
||||
|
||||
read(cameraPacket._matrix);
|
||||
read(cameraPacket._frameStamp);
|
||||
@ -513,8 +513,8 @@ void Broadcaster::sync( void )
|
||||
#if defined (WIN32) && !defined(__CYGWIN__)
|
||||
unsigned int size = sizeof( SOCKADDR_IN );
|
||||
sendto( _so, (const char *)_buffer, _buffer_size, 0, (struct sockaddr *)&saddr, size );
|
||||
int err = WSAGetLastError ();
|
||||
int *dum = (int*) _buffer;
|
||||
// int err = WSAGetLastError ();
|
||||
// int *dum = (int*) _buffer;
|
||||
#else
|
||||
unsigned int size = sizeof( struct sockaddr_in );
|
||||
sendto( _so, (const void *)_buffer, _buffer_size, 0, (struct sockaddr *)&saddr, size );
|
||||
|
@ -733,7 +733,7 @@ double SlideEventHandler::getCurrentTimeDelayBetweenSlides() const
|
||||
if (_slideSwitch.valid())
|
||||
{
|
||||
double duration = -1.0;
|
||||
if (_activeLayer<_slideSwitch->getNumChildren())
|
||||
if (_activeLayer<static_cast<int>(_slideSwitch->getNumChildren()))
|
||||
{
|
||||
duration = getDuration(_slideSwitch->getChild(_activeLayer));
|
||||
}
|
||||
@ -991,7 +991,7 @@ unsigned int SlideEventHandler::getNumSlides()
|
||||
}
|
||||
|
||||
|
||||
bool SlideEventHandler::selectSlide(unsigned int slideNum,unsigned int layerNum)
|
||||
bool SlideEventHandler::selectSlide(int slideNum,int layerNum)
|
||||
{
|
||||
if (!_presentationSwitch) return false;
|
||||
|
||||
@ -1002,7 +1002,7 @@ bool SlideEventHandler::selectSlide(unsigned int slideNum,unsigned int layerNum)
|
||||
slideNum = _presentationSwitch->getNumChildren()-1;
|
||||
}
|
||||
|
||||
if (slideNum>=_presentationSwitch->getNumChildren()) return false;
|
||||
if (slideNum>=static_cast<int>(_presentationSwitch->getNumChildren())) return false;
|
||||
|
||||
|
||||
osg::Timer_t tick = osg::Timer::instance()->tick();
|
||||
@ -1080,7 +1080,7 @@ bool SlideEventHandler::selectSlide(unsigned int slideNum,unsigned int layerNum)
|
||||
|
||||
}
|
||||
|
||||
bool SlideEventHandler::selectLayer(unsigned int layerNum)
|
||||
bool SlideEventHandler::selectLayer(int layerNum)
|
||||
{
|
||||
if (!_slideSwitch) return false;
|
||||
|
||||
@ -1089,7 +1089,7 @@ bool SlideEventHandler::selectLayer(unsigned int layerNum)
|
||||
layerNum = _slideSwitch->getNumChildren()-1;
|
||||
}
|
||||
|
||||
if (layerNum>=_slideSwitch->getNumChildren()) return false;
|
||||
if (layerNum>=static_cast<int>(_slideSwitch->getNumChildren())) return false;
|
||||
|
||||
_activeLayer = layerNum;
|
||||
_slideSwitch->setSingleChildOn(_activeLayer);
|
||||
|
@ -214,7 +214,7 @@ public:
|
||||
enum WhichPosition
|
||||
{
|
||||
FIRST_POSITION = 0,
|
||||
LAST_POSITION = 0xffffffff
|
||||
LAST_POSITION = -1
|
||||
};
|
||||
|
||||
void compileSlide(unsigned int slideNum);
|
||||
@ -222,11 +222,11 @@ public:
|
||||
|
||||
unsigned int getNumSlides();
|
||||
|
||||
unsigned int getActiveSlide() const { return _activeSlide; }
|
||||
unsigned int getActiveLayer() const { return _activeLayer; }
|
||||
int getActiveSlide() const { return _activeSlide; }
|
||||
int getActiveLayer() const { return _activeLayer; }
|
||||
|
||||
bool selectSlide(unsigned int slideNum,unsigned int layerNum=FIRST_POSITION);
|
||||
bool selectLayer(unsigned int layerNum);
|
||||
bool selectSlide(int slideNum,int layerNum=FIRST_POSITION);
|
||||
bool selectLayer(int layerNum);
|
||||
|
||||
bool nextLayerOrSlide();
|
||||
bool previousLayerOrSlide();
|
||||
@ -284,10 +284,10 @@ protected:
|
||||
unsigned int _activePresentation;
|
||||
|
||||
osg::ref_ptr<osg::Switch> _presentationSwitch;
|
||||
unsigned int _activeSlide;
|
||||
int _activeSlide;
|
||||
|
||||
osg::ref_ptr<osg::Switch> _slideSwitch;
|
||||
unsigned int _activeLayer;
|
||||
int _activeLayer;
|
||||
|
||||
bool _firstTraversal;
|
||||
double _previousTime;
|
||||
|
Loading…
Reference in New Issue
Block a user