Răsfoiți Sursa

general: Fix a couple more compiler warnings

- express: Fix a warning when compiling for debug

- dtoolutil: Give TextEncoder a virtual destructor
Sam Edwards 7 ani în urmă
părinte
comite
602ea6ebf4

+ 2 - 0
dtool/src/dtoolutil/textEncoder.h

@@ -44,6 +44,8 @@ PUBLISHED:
   INLINE TextEncoder();
   INLINE TextEncoder(const TextEncoder &copy);
 
+  virtual ~TextEncoder() = default;
+
   INLINE void set_encoding(Encoding encoding);
   INLINE Encoding get_encoding() const;
 

+ 1 - 0
panda/src/express/pointerToArray_ext.I

@@ -39,6 +39,7 @@ INLINE void set_matrix_view(Py_buffer &view, int flags, int length, int size, bo
     mat_size = sizeof(UnalignedLMatrix4d);
   } else {
     nassertv_always(false);
+    return; // Make sure compiler knows control flow doesn't proceed.
   }
 
   view.len = length * mat_size;