Browse Source

Fixed FontTRLE lps reader

Thomas Buck 10 years ago
parent
commit
2025f4cea2
2 changed files with 17 additions and 18 deletions
  1. 0
    1
      TODO.md
  2. 17
    17
      src/FontTRLE.cpp

+ 0
- 1
TODO.md View File

@@ -18,7 +18,6 @@
18 18
 
19 19
 ## Cmake
20 20
 
21
-* Windows setup script needed, moving to AppData/Roaming
22 21
 * Support SSE with other compilers than Clang (src/CMakeLists.txt)
23 22
 * Visual C++ compiler flags? (CMakeLists.txt)
24 23
 

+ 17
- 17
src/FontTRLE.cpp View File

@@ -72,23 +72,23 @@ void FontTRLE::loadLPS(const char *f) {
72 72
 
73 73
     for (std::string line; std::getline(file, line);) {
74 74
         std::istringstream stream(line);
75
-		int index;
76
-		stream >> index;
77
-		if (stream.get() != '=')
78
-			return;
79
-		stream >> offsets[index][0];
80
-		if (stream.get() != ',')
81
-			return;
82
-		stream >> offsets[index][1];
83
-		if (stream.get() != ',')
84
-			return;
85
-		stream >> offsets[index][2];
86
-		if (stream.get() != ',')
87
-			return;
88
-		stream >> offsets[index][3];
89
-		if (stream.get() != ',')
90
-			return;
91
-		stream >> offsets[index][4];
75
+        int index;
76
+        stream >> index;
77
+        if (stream.get() != '=')
78
+            continue;
79
+        stream >> offsets[index][0];
80
+        if (stream.get() != ',')
81
+            continue;
82
+        stream >> offsets[index][1];
83
+        if (stream.get() != ',')
84
+            continue;
85
+        stream >> offsets[index][2];
86
+        if (stream.get() != ',')
87
+            continue;
88
+        stream >> offsets[index][3];
89
+        if (stream.get() != ',')
90
+            continue;
91
+        stream >> offsets[index][4];
92 92
     }
93 93
 }
94 94
 

Loading…
Cancel
Save