File: GmshIO_signed_char.patch

package info (click to toggle)
paraview 5.13.2%2Bdfsg-3.1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 544,660 kB
  • sloc: cpp: 3,374,605; ansic: 1,332,409; python: 150,381; xml: 122,166; sql: 65,887; sh: 7,317; javascript: 5,262; yacc: 4,417; java: 3,977; perl: 2,363; lex: 1,929; f90: 1,397; makefile: 170; objc: 153; tcl: 59; pascal: 50; fortran: 29
file content (37 lines) | stat: -rw-r--r-- 1,494 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
Index: paraview/Plugins/GmshIO/IO/gmshCommon.h
===================================================================
--- paraview.orig/Plugins/GmshIO/IO/gmshCommon.h	2024-05-21 23:57:30.603142774 +0200
+++ paraview/Plugins/GmshIO/IO/gmshCommon.h	2024-05-21 23:57:30.599142734 +0200
@@ -4,7 +4,7 @@
 #include <typeindex>
 
 //-----------------------------------------------------------------------------
-enum class GmshPrimitive : char
+enum class GmshPrimitive : signed char
 {
   Unsupported = -1,
   POINT = 15,
@@ -22,7 +22,7 @@
 template <>
 struct hash<GmshPrimitive>
 {
-  size_t operator()(GmshPrimitive x) const { return hash<char>()(static_cast<char>(x)); }
+  size_t operator()(GmshPrimitive x) const { return hash<signed char>()(static_cast<signed char>(x)); }
 };
 }
 
Index: paraview/Plugins/GmshIO/IO/vtkGmshWriter.cxx
===================================================================
--- paraview.orig/Plugins/GmshIO/IO/vtkGmshWriter.cxx	2024-05-21 23:57:30.603142774 +0200
+++ paraview/Plugins/GmshIO/IO/vtkGmshWriter.cxx	2024-05-21 23:57:30.599142734 +0200
@@ -134,8 +134,8 @@
       continue;
     }
 
-    char gmshType =
-      static_cast<char>(GmshWriterInternal::TRANSLATE_CELLS_TYPE.find(currentType)->second);
+    signed char gmshType =
+      static_cast<signed char>(GmshWriterInternal::TRANSLATE_CELLS_TYPE.find(currentType)->second);
     // If this type is not natively supported, it will be transleted in either lines or triangles
     if (gmshType < 0)
     {