Browse Source

Fix compile errors with clang

rdb 11 years ago
parent
commit
3fbdc43fbb

+ 5 - 0
panda/src/gobj/geomPrimitive.cxx

@@ -1602,6 +1602,11 @@ get_index_format(NumericType index_type) {
       }
       return cformat;
     }
+
+  default:
+    gobj_cat.error()
+      << "Not a valid index type: " << index_type << "\n";
+    return NULL;
   }
 
   return NULL;

+ 1 - 1
panda/src/pgraph/nodePath.cxx

@@ -3760,7 +3760,7 @@ get_shader_input(const InternalName *id) const {
 //  Description: Returns the geometry instance count, or 0 if
 //               disabled. See set_instance_count.
 ////////////////////////////////////////////////////////////////////
-const int NodePath::
+int NodePath::
 get_instance_count() const {
   nassertr_always(!is_empty(), 0);
 

+ 1 - 1
panda/src/pgraph/nodePath.h

@@ -646,7 +646,7 @@ PUBLISHED:
 
   const Shader *get_shader() const;
   const ShaderInput *get_shader_input(const InternalName *id) const;
-  const int get_instance_count() const;
+  int get_instance_count() const;
 
   void set_tex_transform(TextureStage *stage, const TransformState *transform);
   void clear_tex_transform();

+ 4 - 4
panda/src/putil/updateSeq.I

@@ -223,7 +223,7 @@ operator ++ () {
 #else
   _seq = new_seq;
 #endif  // HAVE_THREADS
-    
+
   return *this;
 }
 
@@ -284,15 +284,15 @@ INLINE void UpdateSeq::
 output(ostream &out) const {
   AtomicAdjust::Integer seq = AtomicAdjust::get(_seq);
   switch (seq) {
-  case SC_initial:
+  case (AtomicAdjust::Integer)SC_initial:
     out << "initial";
     break;
 
-  case SC_old:
+  case (AtomicAdjust::Integer)SC_old:
     out << "old";
     break;
 
-  case SC_fresh:
+  case (AtomicAdjust::Integer)SC_fresh:
     out << "fresh";
     break;