From 95d78025697c2f667e4fc2690c2e5f60cda585f2 Mon Sep 17 00:00:00 2001 From: stefan <stefan@5a81b35b-ba03-0410-adc8-b2c5c5119f08> Date: Tue, 18 May 2010 09:00:58 +0000 Subject: [PATCH] Fixed windows build errors git-svn-id: https://dng.biozentrum.unibas.ch/svn/openstructure/trunk@2264 5a81b35b-ba03-0410-adc8-b2c5c5119f08 --- modules/gui/pymod/export_tool.cc | 6 +++--- modules/gui/src/sequence/sequence_model.cc | 14 +++++++------- modules/io/src/formatted_line.hh | 2 +- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/modules/gui/pymod/export_tool.cc b/modules/gui/pymod/export_tool.cc index 730673364..946340659 100644 --- a/modules/gui/pymod/export_tool.cc +++ b/modules/gui/pymod/export_tool.cc @@ -45,7 +45,7 @@ struct WrappedTool : public Tool { try { return call_method<void, MouseEvent>(self, "Click", event); - } catch(error_already_set& e) { + } catch(error_already_set& ) { PyErr_Print(); } } @@ -58,7 +58,7 @@ struct WrappedTool : public Tool { try { return call_method< bool, gfx::NodePtrList >(self, "CanOperateOn", nodes); - } catch(error_already_set& e) { + } catch(error_already_set& ) { PyErr_Print(); } return false; @@ -71,7 +71,7 @@ struct WrappedTool : public Tool String loc = call_method<String>(self, "GetIconPath"); QIcon icon = QIcon(loc.c_str()); return icon; - } catch(error_already_set& e) { + } catch(error_already_set& ) { PyErr_Print(); } QIcon icon = QIcon(); diff --git a/modules/gui/src/sequence/sequence_model.cc b/modules/gui/src/sequence/sequence_model.cc index 95264958b..fc55fe018 100644 --- a/modules/gui/src/sequence/sequence_model.cc +++ b/modules/gui/src/sequence/sequence_model.cc @@ -184,13 +184,13 @@ QModelIndexList SequenceModel::GetModelIndexes(const QString& subject, const QSt for (int i = 0; i<objects_.size(); i++){ ViewObject* object = objects_[i]; QMap<int, QList<int> > indexes = object->GetIndexesForSubject(subject,sequence_name); - QMapIterator< int, QList<int> > i(indexes); - while (i.hasNext()) { - i.next(); - int row = this->GetGlobalRow(object, i.key()); - const QList<int>& index_list = i.value(); - for(int i=0; i<index_list.size(); i++){ - list.append(this->index(row,index_list[i])); + QMapIterator< int, QList<int> > iter(indexes); + while (iter.hasNext()) { + iter.next(); + int row = this->GetGlobalRow(object, iter.key()); + const QList<int>& index_list = iter.value(); + for(int j=0; j<index_list.size(); j++){ + list.append(this->index(row,index_list[j])); } } } diff --git a/modules/io/src/formatted_line.hh b/modules/io/src/formatted_line.hh index ae3c5cafd..dbc573d28 100644 --- a/modules/io/src/formatted_line.hh +++ b/modules/io/src/formatted_line.hh @@ -68,7 +68,7 @@ struct LPaddedInt { struct LPaddedFloat { LPaddedFloat(Real val, int prec) { - double rounded_val=round(val*pow(10, prec))*pow(0.1, prec); + Real rounded_val=round(val*pow(Real(10), prec))*pow(Real(0.1), prec); size_t curr=0; bool minus=rounded_val<0; rounded_val=std::abs(rounded_val); -- GitLab