Compare commits

..

No commits in common. "539980f75f85086fce1a67ec982f83077eabc7c4" and "fb56c6af04b1f983673529928de015d1d5991215" have entirely different histories.

4 changed files with 5 additions and 7 deletions

View File

@ -36,7 +36,7 @@ class Color {
constexpr Color() { SetRGBA(0, 0, 0, 0xFF); }
constexpr Color(uint8_t vr, uint8_t vg, uint8_t vb, uint8_t va = 0xFF) { SetRGBA(vr, vg, vb, va); }
constexpr Color(uint8_t r, uint8_t g, uint8_t b, uint8_t a = 0xFF) { SetRGBA(r, g, b, a); }
Color(Vector4Int v);

View File

@ -66,7 +66,7 @@ template <> struct type_caster<Color> {
return !PyErr_Occurred();
}
static handle cast(Color src, return_value_policy, handle) {
static handle cast(Color src, return_value_policy policy, handle parent) {
PyObject *val = PyTuple_New(4);
for (int i = 0; i < 4; i++) {

View File

@ -341,7 +341,7 @@ BC1Block BC1Encoder::EncodeBlock(const ColorBlock<4, 4> &pixels) const {
// refine endpoints by searching for nearby colors
if (result.error > 0 && _search_rounds > 0) { EndpointSearch(result, pixels); }
return WriteBlock(result);
WriteBlock(result);
}
// Private methods
@ -451,7 +451,6 @@ BC1Block BC1Encoder::WriteBlock(EncodeResults &result) const {
block.SetLowColor(color0);
block.SetHighColor(color1);
block.PackSelectors(selectors);
return block;
}
void BC1Encoder::FindEndpointsSingleColor(EncodeResults &result, Color color, bool is_3color) const {

View File

@ -53,9 +53,8 @@ function(set_project_warnings project_name)
-Woverloaded-virtual # warn if you overload (not override) a virtual
# function
-Wpedantic # warn if non-standard C++ is used
#-Wconversion # warn on type conversions that may lose data
#-Wsign-conversion # warn on sign conversions
-Wenum-conversion
-Wconversion # warn on type conversions that may lose data
-Wsign-conversion # warn on sign conversions
-Wnull-dereference # warn if a null dereference is detected
-Wdouble-promotion # warn if float is implicit promoted to double
-Wformat=2 # warn on security issues around functions that format output