Commit 6ba97741 authored by Jan Möbius's avatar Jan Möbius

Fixed various warnings

git-svn-id: http://www.openmesh.org/svnrepo/OpenMesh/trunk@803 fdac6126-5c0c-442c-9429-916003d36597
parent 8ccd4b16
...@@ -126,7 +126,7 @@ QGLViewerWidget::init(void) ...@@ -126,7 +126,7 @@ QGLViewerWidget::init(void)
QAction *a; QAction *a;
a = add_draw_mode("Wireframe"); a = add_draw_mode("Wireframe");
a->setShortcut(QKeySequence(Key_W)); a->setShortcut(QKeySequence(Key_W));
a = add_draw_mode("Solid Flat"); add_draw_mode("Solid Flat");
a = add_draw_mode("Solid Smooth"); a = add_draw_mode("Solid Smooth");
a->setShortcut(QKeySequence(Key_S)); a->setShortcut(QKeySequence(Key_S));
a->setChecked(true); a->setChecked(true);
......
...@@ -84,7 +84,7 @@ public: ...@@ -84,7 +84,7 @@ public:
/// Constructor /// Constructor
ModBalancerT( D &_dec ) ModBalancerT( D &_dec )
: BaseModQ( _dec ), : BaseModQ( _dec ),
max_level_(0), n_vertices_(0) max_level_(0), n_roots_(0), n_vertices_(0)
{ {
BaseModQ::mesh().add_property( level_ ); BaseModQ::mesh().add_property( level_ );
} }
......
...@@ -261,23 +261,24 @@ bool _OMWriter_::write_binary(std::ostream& _os, BaseExporter& _be, ...@@ -261,23 +261,24 @@ bool _OMWriter_::write_binary(std::ostream& _os, BaseExporter& _be,
} }
// ---------- write vertex texture coords // ---------- write vertex texture coords
if (_be.n_vertices() && _opt.check(Options::VertexTexCoord)) if (_be.n_vertices() && _opt.check(Options::VertexTexCoord)) {
{
t = _be.texcoord(VertexHandle(0)); t = _be.texcoord(VertexHandle(0));
chunk_header.name_ = false; chunk_header.name_ = false;
chunk_header.entity_ = OMFormat::Chunk::Entity_Vertex; chunk_header.entity_ = OMFormat::Chunk::Entity_Vertex;
chunk_header.type_ = OMFormat::Chunk::Type_Texcoord; chunk_header.type_ = OMFormat::Chunk::Type_Texcoord;
chunk_header.signed_ = OMFormat::is_signed(t[0]); chunk_header.signed_ = OMFormat::is_signed(t[0]);
chunk_header.float_ = OMFormat::is_float(t[0]); chunk_header.float_ = OMFormat::is_float(t[0]);
chunk_header.dim_ = OMFormat::dim(t); chunk_header.dim_ = OMFormat::dim(t);
chunk_header.bits_ = OMFormat::bits(t[0]); chunk_header.bits_ = OMFormat::bits(t[0]);
// std::clog << chunk_header << std::endl; // std::clog << chunk_header << std::endl;
bytes += store( _os, chunk_header, swap ); bytes += store(_os, chunk_header, swap);
for (i = 0, nV = _be.n_vertices(); i < nV; ++i)
bytes += vector_store(_os, _be.texcoord(VertexHandle(i)), swap);
for (i=0, nV=_be.n_vertices(); i<nV; ++i)
bytes += vector_store( _os, _be.texcoord(VertexHandle(i)), swap );
} }
// -------------------- write face data // -------------------- write face data
...@@ -296,17 +297,16 @@ bool _OMWriter_::write_binary(std::ostream& _os, BaseExporter& _be, ...@@ -296,17 +297,16 @@ bool _OMWriter_::write_binary(std::ostream& _os, BaseExporter& _be,
for (i=0, nF=_be.n_faces(); i<nF; ++i) for (i=0, nF=_be.n_faces(); i<nF; ++i)
{ {
nV = _be.get_vhandles(FaceHandle(i), vhandles);
if ( header.mesh_ == 'P' ) if ( header.mesh_ == 'P' )
bytes += store( _os, vhandles.size(), bytes += store( _os, vhandles.size(),
OMFormat::Chunk::Integer_16, swap ); OMFormat::Chunk::Integer_16, swap );
for (size_t j=0; j < vhandles.size(); ++j) for (size_t j=0; j < vhandles.size(); ++j)
{ {
using namespace OMFormat; using namespace OMFormat;
using namespace GenProg; using namespace GenProg;
bytes += store( _os, vhandles[j].idx(), bytes += store( _os, vhandles[j].idx(),
Chunk::Integer_Size(chunk_header.bits_), swap ); Chunk::Integer_Size(chunk_header.bits_), swap );
} }
} }
......
...@@ -87,8 +87,8 @@ fill_props( Mesh& _m, OpenMesh::HPropHandleT<T> _ph, bool _check=false) ...@@ -87,8 +87,8 @@ fill_props( Mesh& _m, OpenMesh::HPropHandleT<T> _ph, bool _check=false)
{ {
n = it.handle().idx(); n = it.handle().idx();
v = it.handle().idx()+1; // ival // v = it.handle().idx()+1; // ival
v = values[n%9]; // dval // v = values[n%9]; // dval
v = ((n&(n-1))==0); // bval v = ((n&(n-1))==0); // bval
v.vec4fval[0] = a[n%9]; v.vec4fval[0] = a[n%9];
v.vec4fval[1] = b[n%9]; v.vec4fval[1] = b[n%9];
......
...@@ -195,7 +195,6 @@ namespace OpenMesh { ...@@ -195,7 +195,6 @@ namespace OpenMesh {
bytes += IO::restore( _is, N, _swap ); bytes += IO::restore( _is, N, _swap );
value_type::iterator it = _v.begin();
std::string key; std::string key;
size_t val; size_t val;
......
...@@ -1438,7 +1438,6 @@ void VdE<M>::raise(typename M::EdgeHandle& _eh, state_t _target_state) ...@@ -1438,7 +1438,6 @@ void VdE<M>::raise(typename M::EdgeHandle& _eh, state_t _target_state)
typename M::VertexHandle vh; typename M::VertexHandle vh;
typename M::HalfedgeHandle hh1(Base::mesh_.HEH(_eh, 0)), typename M::HalfedgeHandle hh1(Base::mesh_.HEH(_eh, 0)),
hh2(Base::mesh_.HEH(_eh, 1)); hh2(Base::mesh_.HEH(_eh, 1));
std::vector<typename M::VertexHandle> vertex_vector;
typename M::FaceHandle fh1, fh2; typename M::FaceHandle fh1, fh2;
if (_target_state > 1) { if (_target_state > 1) {
......
...@@ -372,7 +372,6 @@ CatmullClarkT<MeshType,RealType>::update_vertex( MeshType& _m, const VertexHandl ...@@ -372,7 +372,6 @@ CatmullClarkT<MeshType,RealType>::update_vertex( MeshType& _m, const VertexHandl
VertexFaceIter vf_itr; VertexFaceIter vf_itr;
Point Q(0, 0, 0); Point Q(0, 0, 0);
double neigboring_faces(0.0);
for ( vf_itr = _m.vf_iter( _vh); vf_itr; ++vf_itr) //, neigboring_faces += 1.0 ) for ( vf_itr = _m.vf_iter( _vh); vf_itr; ++vf_itr) //, neigboring_faces += 1.0 )
{ {
......
...@@ -97,7 +97,7 @@ private: ...@@ -97,7 +97,7 @@ private:
string pstyle; string pstyle;
vector<string> to_delete; vector<string> to_delete;
int nplots; int nplots;
bool get_program_path(const string); bool get_program_path(const string& );
bool valid; bool valid;
// Name of executed GNUPlot file // Name of executed GNUPlot file
......
...@@ -112,7 +112,7 @@ int kbhit(void) ...@@ -112,7 +112,7 @@ int kbhit(void)
int getch(void) int getch(void)
{ {
char ch; char ch = ' ';
int error; int error;
static struct termios Otty, Ntty; static struct termios Otty, Ntty;
...@@ -149,7 +149,7 @@ int getch(void) ...@@ -149,7 +149,7 @@ int getch(void)
int getche(void) int getche(void)
{ {
char ch; char ch = ' ';
int error; int error;
static struct termios Otty, Ntty; static struct termios Otty, Ntty;
......
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