mirror of
https://github.com/drewcassidy/quicktex.git
synced 2024-09-13 06:37:34 +00:00
fix some warnings
This commit is contained in:
parent
c1bde8560e
commit
8e758d5739
@ -66,7 +66,7 @@ template <> struct type_caster<Color> {
|
|||||||
return !PyErr_Occurred();
|
return !PyErr_Occurred();
|
||||||
}
|
}
|
||||||
|
|
||||||
static handle cast(Color src, return_value_policy policy, handle parent) {
|
static handle cast(Color src, return_value_policy, handle) {
|
||||||
PyObject *val = PyTuple_New(4);
|
PyObject *val = PyTuple_New(4);
|
||||||
|
|
||||||
for (int i = 0; i < 4; i++) {
|
for (int i = 0; i < 4; i++) {
|
||||||
|
@ -341,7 +341,7 @@ BC1Block BC1Encoder::EncodeBlock(const ColorBlock<4, 4> &pixels) const {
|
|||||||
// refine endpoints by searching for nearby colors
|
// refine endpoints by searching for nearby colors
|
||||||
if (result.error > 0 && _search_rounds > 0) { EndpointSearch(result, pixels); }
|
if (result.error > 0 && _search_rounds > 0) { EndpointSearch(result, pixels); }
|
||||||
|
|
||||||
WriteBlock(result);
|
return WriteBlock(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Private methods
|
// Private methods
|
||||||
@ -451,6 +451,7 @@ BC1Block BC1Encoder::WriteBlock(EncodeResults &result) const {
|
|||||||
block.SetLowColor(color0);
|
block.SetLowColor(color0);
|
||||||
block.SetHighColor(color1);
|
block.SetHighColor(color1);
|
||||||
block.PackSelectors(selectors);
|
block.PackSelectors(selectors);
|
||||||
|
return block;
|
||||||
}
|
}
|
||||||
|
|
||||||
void BC1Encoder::FindEndpointsSingleColor(EncodeResults &result, Color color, bool is_3color) const {
|
void BC1Encoder::FindEndpointsSingleColor(EncodeResults &result, Color color, bool is_3color) const {
|
||||||
|
@ -53,8 +53,13 @@ function(set_project_warnings project_name)
|
|||||||
-Woverloaded-virtual # warn if you overload (not override) a virtual
|
-Woverloaded-virtual # warn if you overload (not override) a virtual
|
||||||
# function
|
# function
|
||||||
-Wpedantic # warn if non-standard C++ is used
|
-Wpedantic # warn if non-standard C++ is used
|
||||||
-Wconversion # warn on type conversions that may lose data
|
#-Wconversion # warn on type conversions that may lose data
|
||||||
#-Wsign-conversion # warn on sign conversions
|
#-Wsign-conversion # warn on sign conversions
|
||||||
|
-Wstring-conversion
|
||||||
|
-Wshorten-64-to-32
|
||||||
|
-Wenum-conversion
|
||||||
|
-Wbitfield-enum-conversion
|
||||||
|
-Wnull-conversion
|
||||||
-Wnull-dereference # warn if a null dereference is detected
|
-Wnull-dereference # warn if a null dereference is detected
|
||||||
-Wdouble-promotion # warn if float is implicit promoted to double
|
-Wdouble-promotion # warn if float is implicit promoted to double
|
||||||
-Wformat=2 # warn on security issues around functions that format output
|
-Wformat=2 # warn on security issues around functions that format output
|
||||||
|
Loading…
Reference in New Issue
Block a user