Commit 13111ca1 authored by Jan Möbius's avatar Jan Möbius

Fixed warnings

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@16353 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 0a71cd1d
......@@ -200,8 +200,9 @@ DrawMode::DrawMode() {
layers_[0] = DrawModeProperties();
}
DrawMode::DrawMode( ModeFlagSet _flags ) {
modeFlags_ = _flags;
DrawMode::DrawMode(ModeFlagSet _flags) :
modeFlags_(_flags)
{
layers_.resize(1);
layers_[0] = DrawModeProperties();
}
......
......@@ -60,9 +60,9 @@ public:
}
SkeletonObjectData(const SkeletonObjectData& _copy) :
PerObjectData()
PerObjectData(),
skins_(_copy.skins_)
{
skins_ = _copy.skins_;
}
~SkeletonObjectData(){
......
......@@ -193,33 +193,30 @@ void INIPlugin::loadIniFile( INIFile& _ini, int _id ) {
}
void INIPlugin::saveIniFile( INIFile& _ini, int _id) {
BaseObjectData* baseObject;
if ( !PluginFunctions::getObject(_id,baseObject) ) {
emit log(LOGERR,tr("Cannot find object for id ") + QString::number(_id) + tr(" in saveFile") );
return;
}
PolyMeshObject* polyObject(0);
TriMeshObject* triObject(0);
LightObject* lightObject(0);
// Save all data from baseobjectdata part
saveIniFile(_ini,baseObject);
if(baseObject->dataType() == DATA_POLY_MESH) {
polyObject = PluginFunctions::polyMeshObject(baseObject);
saveIniFileT(_ini, polyObject);
} else if ( baseObject->dataType() == DATA_TRIANGLE_MESH) {
triObject = PluginFunctions::triMeshObject(baseObject);
saveIniFileT(_ini, triObject);
} else if ( baseObject->dataType() == DATA_LIGHT ) {
lightObject = PluginFunctions::lightObject(baseObject);
saveIniFileT(_ini, lightObject);
} else {
// Unhandled data type
emit log(LOGERR, tr("The specified data type is not supported, yet. Aborting!"));
}
BaseObjectData* baseObject;
if (!PluginFunctions::getObject(_id, baseObject)) {
emit log(LOGERR, tr("Cannot find object for id ") + QString::number(_id) + tr(" in saveFile"));
return;
}
// Save all data from baseobjectdata part
saveIniFile(_ini, baseObject);
if (baseObject->dataType() == DATA_POLY_MESH) {
PolyMeshObject* polyObject = PluginFunctions::polyMeshObject(baseObject);
saveIniFileT(_ini, polyObject);
} else if (baseObject->dataType() == DATA_TRIANGLE_MESH) {
TriMeshObject* triObject = PluginFunctions::triMeshObject(baseObject);
saveIniFileT(_ini, triObject);
} else if (baseObject->dataType() == DATA_LIGHT) {
LightObject* lightObject = PluginFunctions::lightObject(baseObject);
saveIniFileT(_ini, lightObject);
} else {
// Unhandled data type
emit log(LOGERR, tr("The specified data type is not supported, yet. Aborting!"));
}
}
......
......@@ -135,7 +135,6 @@ template<class MeshT>
void MeshFixing<MeshT>::fix_topology()
{
int component;
int nf;
const unsigned int numberOfVertices = vertices_.size();
......
......@@ -190,7 +190,6 @@ void TextureControlPlugin::slotMultiTextureAdded( QString _textureGroup , QStrin
slotTextureAdded( _name , _filename , 2 , _id);
// Get the id of the new texture
_textureId = -1;
_textureId = texData->texture(_name).id();
//hide the texture (its accessible through the multiTexture)
......
......@@ -188,8 +188,7 @@ int TextureData::addTexture ( Texture _texture, GLuint _glName ) {
}
bool TextureData::addMultiTexture( QString _textureName ) {
int textureid = -1;
textureid = getTextureIndex(_textureName);
int textureid = getTextureIndex(_textureName);
if ( textureid != -1) {
std::cerr << "Texture exists!" << std::endl;
......@@ -212,8 +211,7 @@ bool TextureData::addMultiTexture( QString _textureName ) {
/// Stores the given image in the texture information
bool TextureData::setImage( QString _textureName , int _id ) {
int textureid = -1;
textureid = getTextureIndex(_textureName);
int textureid = getTextureIndex(_textureName);
if ( textureid == -1) {
std::cerr << "setImage: Unknown Texture!" << std::endl;
......
......@@ -1531,8 +1531,6 @@ void SelectionBasePlugin::objectDeleted (int _id) {
bool found = false;
DataType t;
std::vector<DataType> typeVec;
BaseObjectData* obj;
PluginFunctions::getObject(_id, obj);
if (obj) {
......
......@@ -435,7 +435,6 @@ void SplatCloudObjectSelectionPlugin::loadIniFile( INIFile &_ini, int _objectId
}
std::vector<int> ids;
bool invert = false;
bool updated_selection = false;
bool updated_modeling_regions = false;
......@@ -444,7 +443,7 @@ void SplatCloudObjectSelectionPlugin::loadIniFile( INIFile &_ini, int _objectId
if( _ini.get_entry( ids, sectionName, "VertexSelection" ) )
{
invert = false;
bool invert = false;
_ini.get_entry( invert, sectionName, "InvertVertexSelection" );
if( invert )
......@@ -489,8 +488,6 @@ void SplatCloudObjectSelectionPlugin::saveIniFile( INIFile &_ini, int _objectId
return;
}
std::vector<int> ids;
// The objects section should already exist
QString sectionName = object->name();
if( !_ini.section_exists( sectionName ) )
......
......@@ -361,10 +361,10 @@ void VolumeMeshSelectionPlugin::slotCustomSelection(QMouseEvent *_event, Primiti
ACG::Vec3d hit_point;
BaseObjectData* object = 0;
if(_currentType & cellType_) {
BaseObjectData* object = 0;
// Perform picking
unsigned int node_idx, target_idx;
bool successfullyPicked = PluginFunctions::scenegraphPick(ACG::SceneGraph::PICK_FACE, _event->pos(),
......@@ -408,11 +408,11 @@ void VolumeMeshSelectionPlugin::slotCustomSelection(QMouseEvent *_event, Primiti
if(_customIdentifier == sheetSelectionHandle_) {
ACG::Vec3d hit_point;
if(_currentType & cellType_) {
BaseObjectData* object = 0;
BaseObjectData* object = 0;
ACG::Vec3d hit_point;
if(_currentType & cellType_) {
// Perform picking
unsigned int node_idx, target_idx;
bool successfullyPicked = PluginFunctions::scenegraphPick(ACG::SceneGraph::PICK_FACE, _event->pos(),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment