general: Fix a couple more compiler warnings

- express: Fix a warning when compiling for debug

- dtoolutil: Give TextEncoder a virtual destructor
This commit is contained in:
Sam Edwards 2018-10-13 15:18:05 -06:00
parent 84ed19e8a7
commit 602ea6ebf4
2 changed files with 3 additions and 0 deletions

View File

@ -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;

View File

@ -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;