Просмотр исходного кода

general: Fix a couple more compiler warnings

- express: Fix a warning when compiling for debug

- dtoolutil: Give TextEncoder a virtual destructor
Sam Edwards 7 лет назад
Родитель
Сommit
602ea6ebf4
2 измененных файлов с 3 добавлено и 0 удалено
  1. 2 0
      dtool/src/dtoolutil/textEncoder.h
  2. 1 0
      panda/src/express/pointerToArray_ext.I

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

@@ -44,6 +44,8 @@ PUBLISHED:
   INLINE TextEncoder();
   INLINE TextEncoder();
   INLINE TextEncoder(const TextEncoder &copy);
   INLINE TextEncoder(const TextEncoder &copy);
 
 
+  virtual ~TextEncoder() = default;
+
   INLINE void set_encoding(Encoding encoding);
   INLINE void set_encoding(Encoding encoding);
   INLINE Encoding get_encoding() const;
   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);
     mat_size = sizeof(UnalignedLMatrix4d);
   } else {
   } else {
     nassertv_always(false);
     nassertv_always(false);
+    return; // Make sure compiler knows control flow doesn't proceed.
   }
   }
 
 
   view.len = length * mat_size;
   view.len = length * mat_size;