graphics/hvif-tools: fix build on ARM / POWER
/wrkdirs/usr/ports/graphics/hvif-tools/work/hvif-tools-2.1.0/src/tracer/processing/PathScanner.cpp:20:4: error: constant expression evaluates to -1 which cannot be narrowed to type 'char' [-Wc++11-narrowing]
20 | {{-1,-1,-1,-1}, {-1,-1,-1,-1}, {-1,-1,-1,-1}, {-1,-1,-1,-1}}, // 0
| ^~
/wrkdirs/usr/ports/graphics/hvif-tools/work/hvif-tools-2.1.0/src/tracer/processing/PathScanner.cpp:20:4: note: insert an explicit cast to silence this issue
20 | {{-1,-1,-1,-1}, {-1,-1,-1,-1}, {-1,-1,-1,-1}, {-1,-1,-1,-1}}, // 0
| ^~
| static_cast<char>( )
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
--- src/tracer/processing/PathScanner.cpp.orig 2025-12-14 12:31:31 UTC
|
||||
+++ src/tracer/processing/PathScanner.cpp
|
||||
@@ -16,7 +16,7 @@ const bool PathScanner::kPathScanHolePathLookup[16] =
|
||||
false, false, false, true, false, true, true, false
|
||||
};
|
||||
|
||||
-const char PathScanner::kPathScanCombinedLookup[16][4][4] = {
|
||||
+const signed char PathScanner::kPathScanCombinedLookup[16][4][4] = {
|
||||
{{-1,-1,-1,-1}, {-1,-1,-1,-1}, {-1,-1,-1,-1}, {-1,-1,-1,-1}}, // 0
|
||||
{{ 0, 1, 0,-1}, {-1,-1,-1,-1}, {-1,-1,-1,-1}, { 0, 2,-1, 0}}, // 1
|
||||
{{-1,-1,-1,-1}, {-1,-1,-1,-1}, { 0, 1, 0,-1}, { 0, 0, 1, 0}}, // 2
|
||||
@@ -137,7 +137,7 @@ PathScanner::ScanPaths(std::vector<std::vector<int> >&
|
||||
break;
|
||||
}
|
||||
|
||||
- const char* lookupRow = kPathScanCombinedLookup[code][direction];
|
||||
+ const signed char* lookupRow = kPathScanCombinedLookup[code][direction];
|
||||
|
||||
if (lookupRow[1] < 0) {
|
||||
pathFinished = true;
|
||||
@@ -0,0 +1,11 @@
|
||||
--- src/tracer/processing/PathScanner.h.orig 2025-12-14 12:31:58 UTC
|
||||
+++ src/tracer/processing/PathScanner.h
|
||||
@@ -35,7 +35,7 @@ class PathScanner { (private)
|
||||
private:
|
||||
static const unsigned char kPathScanDirectionLookup[16];
|
||||
static const bool kPathScanHolePathLookup[16];
|
||||
- static const char kPathScanCombinedLookup[16][4][4];
|
||||
+ static const signed char kPathScanCombinedLookup[16][4][4];
|
||||
};
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user