Fixed shadows warnings

This commit is contained in:
Robert Osfield
2016-05-26 08:25:12 +01:00
parent 95d8d7d993
commit bdad1f60c9
6 changed files with 23 additions and 18 deletions

View File

@@ -475,9 +475,9 @@ dxfPolyline::assign(dxfFile* dxf, codeValue& cv)
void
dxfPolyline::drawScene(scene* sc)
{
Matrixd m;
getOCSMatrix(_ocs, m);
sc->ocs(m);
Matrixd matrx;
getOCSMatrix(_ocs, matrx);
sc->ocs(matrx);
std::vector<Vec3d> vlist;
std::vector<Vec3d> qlist;
Vec3d a, b, c, d;

View File

@@ -169,9 +169,9 @@ bool FFmpegDecoder::open(const std::string & filename, FFmpegParameters* paramet
{
m_audio_decoder.open(m_audio_stream, parameters);
}
catch (const std::runtime_error & error)
catch (const std::runtime_error & rerror)
{
OSG_WARN << "FFmpegImageStream::open audio failed, audio stream will be disabled: " << error.what() << std::endl;
OSG_WARN << "FFmpegImageStream::open audio failed, audio stream will be disabled: " << rerror.what() << std::endl;
}
}

View File

@@ -26,17 +26,17 @@ namespace osgFFmpeg
packet.data = 0;
}
explicit FFmpegPacket(const Type type) :
type(type)
{
explicit FFmpegPacket(const Type t) :
type(t)
{
packet.data = 0;
}
explicit FFmpegPacket(const AVPacket & packet) :
packet(packet),
explicit FFmpegPacket(const AVPacket & p) :
packet(p),
type(PACKET_DATA)
{
{
}
void clear()

View File

@@ -162,12 +162,12 @@ osg::Group *SceneLoader::load(const std::string &filename, const osgDB::ReaderWr
// build objects and object animations
typedef std::map<int, osg::ref_ptr<osg::PositionAttitudeTransform> > PAT_map;
PAT_map pats;
int j = 0;
for (Scene_object_list::iterator i=scene_objects_.begin(); i!=scene_objects_.end(); ++i, ++j) {
osg::ref_ptr<osg::PositionAttitudeTransform> pat = pats[j];
int p = 0;
for (Scene_object_list::iterator i=scene_objects_.begin(); i!=scene_objects_.end(); ++i, ++p) {
osg::ref_ptr<osg::PositionAttitudeTransform> pat = pats[p];
if (!pat.valid()) {
pat = new osg::PositionAttitudeTransform;
pats[j] = pat;
pats[p] = pat;
}
pat->setName(i->name);

View File

@@ -5,7 +5,7 @@ SET(TARGET_SRC ReaderWriterOGR.cpp)
SET(TARGET_LIBRARIES_VARS GDAL_LIBRARY )
IF(CMAKE_COMPILER_IS_GNUCXX)
# Remove -pedantic flag as it barfs on ffmoeg headers
# Remove -Wshadow flag as it barfs on ffmoeg headers
STRING(REGEX REPLACE "-Wshadow" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
ENDIF()

View File

@@ -2,7 +2,12 @@ INCLUDE_DIRECTORIES( ${RSVG_INCLUDE_DIRS} ${CAIRO_INCLUDE_DIRS})
LINK_DIRECTORIES(${RSVG_LIBRARY_DIRS} ${CAIRO_LIBRARY_DIRS})
LINK_LIBRARIES(${RSVG_LIBRARIES} ${CAIRO_LIBRARIES})
SET(TARGET_SRC ReaderWriterSVG.cpp )
IF(CMAKE_COMPILER_IS_GNUCXX)
# Remove -pedantic flag as it barfs on ffmoeg headers
STRING(REGEX REPLACE "-pedantic" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
ENDIF()
#### end var setup ###
SETUP_PLUGIN(svg svg)