瀏覽代碼

Format code [skip ci]

Thomas Buck 9 年之前
父節點
當前提交
09b15dddcd

+ 1
- 1
include/global.h 查看文件

106
 
106
 
107
 template<typename T, typename U>
107
 template<typename T, typename U>
108
 [[noreturn]] void assertEqualImplementation(const char* exp, T a, U b, const char* file, int line,
108
 [[noreturn]] void assertEqualImplementation(const char* exp, T a, U b, const char* file, int line,
109
-                                            bool print = false, const char* str = nullptr) {
109
+        bool print = false, const char* str = nullptr) {
110
     const unsigned int maxSize = 128;
110
     const unsigned int maxSize = 128;
111
     void* callstack[maxSize];
111
     void* callstack[maxSize];
112
     int frames = backtrace(callstack, maxSize);
112
     int frames = backtrace(callstack, maxSize);

+ 2
- 2
include/system/FontTTF.h 查看文件

23
     int initialize(unsigned char* fontData, int firstChar);
23
     int initialize(unsigned char* fontData, int firstChar);
24
     bool contains(int c);
24
     bool contains(int c);
25
     int getTexture() { return texture; }
25
     int getTexture() { return texture; }
26
-    void getQuad(int c, float* xpos, float* ypos, stbtt_aligned_quad *quad);
26
+    void getQuad(int c, float* xpos, float* ypos, stbtt_aligned_quad* quad);
27
 
27
 
28
   private:
28
   private:
29
     int begin;
29
     int begin;
46
 
46
 
47
   private:
47
   private:
48
     static int charIsMapped(int c);
48
     static int charIsMapped(int c);
49
-    static int getQuad(int c, float* xpos, float* ypos, stbtt_aligned_quad *quad);
49
+    static int getQuad(int c, float* xpos, float* ypos, stbtt_aligned_quad* quad);
50
     static void drawTextInternal(unsigned int x, unsigned int y, float scale,
50
     static void drawTextInternal(unsigned int x, unsigned int y, float scale,
51
                                  const unsigned char color[4], unsigned int maxWidth, std::string s,
51
                                  const unsigned char color[4], unsigned int maxWidth, std::string s,
52
                                  bool drawWrapped);
52
                                  bool drawWrapped);

+ 1
- 1
include/system/Shader.h 查看文件

21
 
21
 
22
     template<typename T>
22
     template<typename T>
23
     void bufferData(std::vector<T> v)
23
     void bufferData(std::vector<T> v)
24
-        { bufferData(v.size(), sizeof(T), &v[0]); }
24
+    { bufferData(v.size(), sizeof(T), &v[0]); }
25
 
25
 
26
     void bindBuffer();
26
     void bindBuffer();
27
     void bindBuffer(int location, int size);
27
     void bindBuffer(int location, int size);

+ 2
- 1
include/utils/Folder.h 查看文件

49
     void executeRemoveRecursiveFiles(std::function<bool (File& f)> func);
49
     void executeRemoveRecursiveFiles(std::function<bool (File& f)> func);
50
     std::string getRecursiveFileName(unsigned long i);
50
     std::string getRecursiveFileName(unsigned long i);
51
     File& getRecursiveFile(unsigned long i);
51
     File& getRecursiveFile(unsigned long i);
52
-    void findRecursiveFilesEndingWith(std::vector<File>& found, std::string end, bool casesensitive = false);
52
+    void findRecursiveFilesEndingWith(std::vector<File>& found, std::string end,
53
+                                      bool casesensitive = false);
53
 
54
 
54
   private:
55
   private:
55
     void createFolderItems();
56
     void createFolderItems();

+ 1
- 1
src/Console.cpp 查看文件

89
         ImGui::Checkbox("Info##log", &visibleLogs[3]);
89
         ImGui::Checkbox("Info##log", &visibleLogs[3]);
90
         ImGui::SameLine();
90
         ImGui::SameLine();
91
         ImGui::Checkbox("Debug##log", &visibleLogs[4]);
91
         ImGui::Checkbox("Debug##log", &visibleLogs[4]);
92
-        ImGui::SameLine();
92
+
93
         static bool logToTTY = false, logToClipboard = false, logToFile = false;
93
         static bool logToTTY = false, logToClipboard = false, logToFile = false;
94
         if (ImGui::Button("Log to TTY")) { logToTTY = true; }
94
         if (ImGui::Button("Log to TTY")) { logToTTY = true; }
95
         ImGui::SameLine();
95
         ImGui::SameLine();

+ 5
- 5
src/Entity.cpp 查看文件

43
 
43
 
44
 void Entity::print() {
44
 void Entity::print() {
45
     Log::get(LOG_INFO) << "Entity " << objectId << ":" << Log::endl
45
     Log::get(LOG_INFO) << "Entity " << objectId << ":" << Log::endl
46
-             << "  Room " << room << " (" << getWorld().getRoom(room).getFlags()
47
-             << ")" << Log::endl
48
-             << "  " << pos[0] << "x " << pos[1] << "y " << pos[2] << "z"
49
-             << Log::endl
50
-             << "  " << glm::degrees(angles[1]) << " Yaw" << Log::endl;
46
+                       << "  Room " << room << " (" << getWorld().getRoom(room).getFlags()
47
+                       << ")" << Log::endl
48
+                       << "  " << pos[0] << "x " << pos[1] << "y " << pos[2] << "z"
49
+                       << Log::endl
50
+                       << "  " << glm::degrees(angles[1]) << " Yaw" << Log::endl;
51
 }
51
 }
52
 
52
 
53
 SkeletalModel& Entity::getModel() {
53
 SkeletalModel& Entity::getModel() {

+ 2
- 2
src/MenuFolder.cpp 查看文件

59
             Loader::LoaderVersion version = Loader::checkFile(f.getPath());
59
             Loader::LoaderVersion version = Loader::checkFile(f.getPath());
60
             if (version == Loader::TR_UNKNOWN) {
60
             if (version == Loader::TR_UNKNOWN) {
61
                 Log::get(LOG_ERROR) << "Error: pak file '" << f.getName().c_str()
61
                 Log::get(LOG_ERROR) << "Error: pak file '" << f.getName().c_str()
62
-                         << "' invalid" << Log::endl;
62
+                                    << "' invalid" << Log::endl;
63
                 return true; // delete file from list
63
                 return true; // delete file from list
64
             }
64
             }
65
 
65
 
118
         }
118
         }
119
     } else {
119
     } else {
120
         int error = Game::loadLevel(mapFolder->getFile((unsigned long)mCursor
120
         int error = Game::loadLevel(mapFolder->getFile((unsigned long)mCursor
121
-                                        - 1 - mapFolder->folderCount()).getPath().c_str());
121
+                                    - 1 - mapFolder->folderCount()).getPath().c_str());
122
         if (error == 0) {
122
         if (error == 0) {
123
             visible = false;
123
             visible = false;
124
         } else {
124
         } else {

+ 1
- 1
src/Mesh.cpp 查看文件

133
 
133
 
134
         while ((indexStart != indexPos) && (indexPos < indicesBuff.size())) {
134
         while ((indexStart != indexPos) && (indexPos < indicesBuff.size())) {
135
             while ((indexPos < indicesBuff.size())
135
             while ((indexPos < indicesBuff.size())
136
-                    && (texturesBuff.at(indicesBuff.at(indexPos)) == texture)) {
136
+                   && (texturesBuff.at(indicesBuff.at(indexPos)) == texture)) {
137
                 indexPos++;
137
                 indexPos++;
138
             }
138
             }
139
 
139
 

+ 1
- 1
src/Room.cpp 查看文件

16
 
16
 
17
 Room::Room(glm::vec3 _pos, BoundingBox* _bbox, RoomMesh* _mesh, unsigned int f,
17
 Room::Room(glm::vec3 _pos, BoundingBox* _bbox, RoomMesh* _mesh, unsigned int f,
18
            int a, int x, int z) : pos(_pos), bbox(_bbox), mesh(_mesh), flags(f),
18
            int a, int x, int z) : pos(_pos), bbox(_bbox), mesh(_mesh), flags(f),
19
-                                  alternateRoom(a), numXSectors(x), numZSectors(z) {
19
+    alternateRoom(a), numXSectors(x), numZSectors(z) {
20
     model = glm::translate(glm::mat4(1.0f), pos);
20
     model = glm::translate(glm::mat4(1.0f), pos);
21
 }
21
 }
22
 
22
 

+ 1
- 1
src/RoomMesh.cpp 查看文件

77
 
77
 
78
         while ((indexStart != indexPos) && (indexPos < indicesBuff.size())) {
78
         while ((indexStart != indexPos) && (indexPos < indicesBuff.size())) {
79
             while ((indexPos < indicesBuff.size())
79
             while ((indexPos < indicesBuff.size())
80
-                    && (texturesBuff.at(indicesBuff.at(indexPos)) == texture)) {
80
+                   && (texturesBuff.at(indicesBuff.at(indexPos)) == texture)) {
81
                 indexPos++;
81
                 indexPos++;
82
             }
82
             }
83
 
83
 

+ 1
- 1
src/TextureManager.cpp 查看文件

246
         if (data) {
246
         if (data) {
247
             if ((n < 3) || (n > 4)) {
247
             if ((n < 3) || (n > 4)) {
248
                 Log::get(LOG_ERROR) << "Image \"" << filename << "\" has unsupported format ("
248
                 Log::get(LOG_ERROR) << "Image \"" << filename << "\" has unsupported format ("
249
-                         << n << ")!" << Log::endl;
249
+                                    << n << ")!" << Log::endl;
250
                 stbi_image_free(data);
250
                 stbi_image_free(data);
251
                 return -2;
251
                 return -2;
252
             }
252
             }

+ 4
- 4
src/UI.cpp 查看文件

92
                                            (int)png_size, &tex_x, &tex_y, &tex_comp, 0);
92
                                            (int)png_size, &tex_x, &tex_y, &tex_comp, 0);
93
 
93
 
94
     fontTex = TextureManager::loadBufferSlot((unsigned char*)tex_data,
94
     fontTex = TextureManager::loadBufferSlot((unsigned char*)tex_data,
95
-                                             tex_x, tex_y, ColorMode::RGBA, 32,
96
-                                             TextureStorage::SYSTEM, -1, false);
95
+              tex_x, tex_y, ColorMode::RGBA, 32,
96
+              TextureStorage::SYSTEM, -1, false);
97
 
97
 
98
     stbi_image_free(tex_data);
98
     stbi_image_free(tex_data);
99
 
99
 
175
             auto i = motionEvents.front();
175
             auto i = motionEvents.front();
176
             if (!getMenu().isVisible()) {
176
             if (!getMenu().isVisible()) {
177
                 Game::handleMouseMotion(std::get<0>(i), std::get<1>(i),
177
                 Game::handleMouseMotion(std::get<0>(i), std::get<1>(i),
178
-                                            std::get<2>(i), std::get<3>(i));
178
+                                        std::get<2>(i), std::get<3>(i));
179
             }
179
             }
180
             motionEvents.pop_front();
180
             motionEvents.pop_front();
181
         }
181
         }
251
 
251
 
252
 void UI::display() {
252
 void UI::display() {
253
     if (RunTime::getShowFPS()) {
253
     if (RunTime::getShowFPS()) {
254
-        if (ImGui::Begin("Debug Overlay", nullptr, ImVec2(0,0), 0.3f,
254
+        if (ImGui::Begin("Debug Overlay", nullptr, ImVec2(0, 0), 0.3f,
255
                          ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoResize
255
                          ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoResize
256
                          | ImGuiWindowFlags_NoMove | ImGuiWindowFlags_NoSavedSettings
256
                          | ImGuiWindowFlags_NoMove | ImGuiWindowFlags_NoSavedSettings
257
                          | ImGuiWindowFlags_AlwaysAutoResize)) {
257
                          | ImGuiWindowFlags_AlwaysAutoResize)) {

+ 2
- 1
src/commands/CommandSet.cpp 查看文件

137
         args >> temp;
137
         args >> temp;
138
         int error = Font::initialize(expandNames(temp));
138
         int error = Font::initialize(expandNames(temp));
139
         if (error != 0)
139
         if (error != 0)
140
-            Log::get(LOG_USER) << "Error initializing font: " << expandNames(temp) << "(" << error << ")" << Log::endl;
140
+            Log::get(LOG_USER) << "Error initializing font: " << expandNames(temp) << "(" << error << ")" <<
141
+                               Log::endl;
141
     } else {
142
     } else {
142
         Log::get(LOG_USER) << "set-Error: Unknown variable (" << var.c_str() << ")" << Log::endl;
143
         Log::get(LOG_USER) << "set-Error: Unknown variable (" << var.c_str() << ")" << Log::endl;
143
         return -1;
144
         return -1;

+ 17
- 13
src/loader/LoaderTR2.cpp 查看文件

156
         int count = animatedTextures.at(pos) + 1;
156
         int count = animatedTextures.at(pos) + 1;
157
         if ((pos + count) >= numWords) {
157
         if ((pos + count) >= numWords) {
158
             Log::get(LOG_DEBUG) << "LoaderTR2: Invalid AnimatedTextures ("
158
             Log::get(LOG_DEBUG) << "LoaderTR2: Invalid AnimatedTextures ("
159
-                     << pos + count << " >= " << numWords << ")!" << Log::endl;
159
+                                << pos + count << " >= " << numWords << ")!" << Log::endl;
160
             return;
160
             return;
161
         }
161
         }
162
 
162
 
168
     }
168
     }
169
 
169
 
170
     if ((numAnimatedTextures > 0) || (numWords > 0))
170
     if ((numAnimatedTextures > 0) || (numWords > 0))
171
-        Log::get(LOG_INFO) << "LoaderTR2: Found " << numAnimatedTextures << " Animated Textures!" << Log::endl;
171
+        Log::get(LOG_INFO) << "LoaderTR2: Found " << numAnimatedTextures << " Animated Textures!" <<
172
+                           Log::endl;
172
     else
173
     else
173
         Log::get(LOG_INFO) << "LoaderTR2: No Animated Textures in this level?!" << Log::endl;
174
         Log::get(LOG_INFO) << "LoaderTR2: No Animated Textures in this level?!" << Log::endl;
174
 
175
 
407
         if ((numPortals == 0) && (numVertices == 0)
408
         if ((numPortals == 0) && (numVertices == 0)
408
             && (numRectangles == 0) && (numTriangles == 0))
409
             && (numRectangles == 0) && (numTriangles == 0))
409
             Log::get(LOG_DEBUG) << "LoaderTR2: Room " << i << " seems invalid: " << numPortals << "p "
410
             Log::get(LOG_DEBUG) << "LoaderTR2: Room " << i << " seems invalid: " << numPortals << "p "
410
-                     << numRectangles << "r " << numTriangles << "t " << numVertices
411
-                     << "v" << Log::endl;
411
+                                << numRectangles << "r " << numTriangles << "t " << numVertices
412
+                                << "v" << Log::endl;
412
     }
413
     }
413
 
414
 
414
     if (numRooms > 0)
415
     if (numRooms > 0)
426
     }
427
     }
427
 
428
 
428
     if (numFloorData > 0)
429
     if (numFloorData > 0)
429
-        Log::get(LOG_INFO) << "LoaderTR2: Found " << numFloorData << " words FloorData, unimplemented!" << Log::endl;
430
+        Log::get(LOG_INFO) << "LoaderTR2: Found " << numFloorData << " words FloorData, unimplemented!" <<
431
+                           Log::endl;
430
     else
432
     else
431
         Log::get(LOG_INFO) << "LoaderTR2: No FloorData in this level?!" << Log::endl;
433
         Log::get(LOG_INFO) << "LoaderTR2: No FloorData in this level?!" << Log::endl;
432
 }
434
 }
468
     }
470
     }
469
 
471
 
470
     if ((numSpriteTextures > 0) || (numSpriteSequences > 0))
472
     if ((numSpriteTextures > 0) || (numSpriteSequences > 0))
471
-        Log::get(LOG_INFO) << "LoaderTR2: Found " << numSpriteTextures << " Sprites in " << numSpriteSequences <<
472
-                 " Sequences!" << Log::endl;
473
+        Log::get(LOG_INFO) << "LoaderTR2: Found " << numSpriteTextures << " Sprites in " <<
474
+                           numSpriteSequences <<
475
+                           " Sequences!" << Log::endl;
473
     else
476
     else
474
         Log::get(LOG_INFO) << "LoaderTR2: No Sprites in this level?!" << Log::endl;
477
         Log::get(LOG_INFO) << "LoaderTR2: No Sprites in this level?!" << Log::endl;
475
 }
478
 }
494
 
497
 
495
         if (numMeshData < (meshPointer / 2)) {
498
         if (numMeshData < (meshPointer / 2)) {
496
             Log::get(LOG_DEBUG) << "LoaderTR2: Invalid Mesh: "
499
             Log::get(LOG_DEBUG) << "LoaderTR2: Invalid Mesh: "
497
-                     << (meshPointer / 2) << " > " << numMeshData << Log::endl;
500
+                                << (meshPointer / 2) << " > " << numMeshData << Log::endl;
498
             continue;
501
             continue;
499
         }
502
         }
500
 
503
 
742
     }
745
     }
743
 
746
 
744
     if (numAnimDispatches > 0)
747
     if (numAnimDispatches > 0)
745
-        Log::get(LOG_INFO) << "LoaderTR2: Found " << numAnimDispatches << " AnimationDispatches!" << Log::endl;
748
+        Log::get(LOG_INFO) << "LoaderTR2: Found " << numAnimDispatches << " AnimationDispatches!" <<
749
+                           Log::endl;
746
     else
750
     else
747
         Log::get(LOG_INFO) << "LoaderTR2: No AnimationDispatches in this level?!" << Log::endl;
751
         Log::get(LOG_INFO) << "LoaderTR2: No AnimationDispatches in this level?!" << Log::endl;
748
 
752
 
998
 
1002
 
999
     if ((numBoxes > 0) || (numOverlaps > 0))
1003
     if ((numBoxes > 0) || (numOverlaps > 0))
1000
         Log::get(LOG_INFO) << "LoaderTR2: Found NPC NavigationHints (" << numBoxes
1004
         Log::get(LOG_INFO) << "LoaderTR2: Found NPC NavigationHints (" << numBoxes
1001
-                 << ", " << numOverlaps << ", " << list << "), unimplemented!" << Log::endl;
1005
+                           << ", " << numOverlaps << ", " << list << "), unimplemented!" << Log::endl;
1002
     else
1006
     else
1003
         Log::get(LOG_INFO) << "LoaderTR2: No NPC NavigationHints in this level?!" << Log::endl;
1007
         Log::get(LOG_INFO) << "LoaderTR2: No NPC NavigationHints in this level?!" << Log::endl;
1004
 }
1008
 }
1092
 
1096
 
1093
         if (std::string("RIFF") != std::string(test)) {
1097
         if (std::string("RIFF") != std::string(test)) {
1094
             Log::get(LOG_DEBUG) << "LoaderTR2: External SFX invalid! (" << riffCount
1098
             Log::get(LOG_DEBUG) << "LoaderTR2: External SFX invalid! (" << riffCount
1095
-                     << ", \"" << test << "\" != \"RIFF\")" << Log::endl;
1099
+                                << ", \"" << test << "\" != \"RIFF\")" << Log::endl;
1096
             return;
1100
             return;
1097
         }
1101
         }
1098
 
1102
 
1152
 
1156
 
1153
     if (numCinematicFrames > 0)
1157
     if (numCinematicFrames > 0)
1154
         Log::get(LOG_INFO) << "LoaderTR2: Found " << numCinematicFrames
1158
         Log::get(LOG_INFO) << "LoaderTR2: Found " << numCinematicFrames
1155
-                 << " CinematicFrames, unimplemented!" << Log::endl;
1159
+                           << " CinematicFrames, unimplemented!" << Log::endl;
1156
 }
1160
 }
1157
 
1161
 
1158
 void LoaderTR2::loadDemoData() {
1162
 void LoaderTR2::loadDemoData() {
1163
     // TODO store demo data somewhere, find out meaning
1167
     // TODO store demo data somewhere, find out meaning
1164
     if (numDemoData > 0)
1168
     if (numDemoData > 0)
1165
         Log::get(LOG_INFO) << "LoaderTR2: Found " << numDemoData << " bytes DemoData, unimplemented!" <<
1169
         Log::get(LOG_INFO) << "LoaderTR2: Found " << numDemoData << " bytes DemoData, unimplemented!" <<
1166
-                 Log::endl;
1170
+                           Log::endl;
1167
 }
1171
 }
1168
 
1172
 

+ 2
- 2
src/system/FontTRLE.cpp 查看文件

47
     }
47
     }
48
 
48
 
49
     mFontTexture = TextureManager::loadBufferSlot(pixels, 256, 256,
49
     mFontTexture = TextureManager::loadBufferSlot(pixels, 256, 256,
50
-                                                  ColorMode::BGRA, 32,
51
-                                                  TextureStorage::SYSTEM);
50
+                   ColorMode::BGRA, 32,
51
+                   TextureStorage::SYSTEM);
52
     delete [] pixels;
52
     delete [] pixels;
53
 
53
 
54
     // Try to load .lps file or use default glyph positions
54
     // Try to load .lps file or use default glyph positions

+ 4
- 4
src/system/FontTTF.cpp 查看文件

67
     delete [] pixels;
67
     delete [] pixels;
68
 
68
 
69
     texture = TextureManager::loadBufferSlot(rgb, MAP_WIDTH, MAP_HEIGHT, ColorMode::RGBA,
69
     texture = TextureManager::loadBufferSlot(rgb, MAP_WIDTH, MAP_HEIGHT, ColorMode::RGBA,
70
-                                             32, TextureStorage::SYSTEM, texture);
70
+              32, TextureStorage::SYSTEM, texture);
71
     delete [] rgb;
71
     delete [] rgb;
72
     if (texture < 0) {
72
     if (texture < 0) {
73
         delete [] charInfo;
73
         delete [] charInfo;
85
     return (begin >= 0) && (c >= begin) && (c < (begin + MAP_NUM_CHARS));
85
     return (begin >= 0) && (c >= begin) && (c < (begin + MAP_NUM_CHARS));
86
 }
86
 }
87
 
87
 
88
-void FontMapTTF::getQuad(int c, float* xpos, float* ypos, stbtt_aligned_quad *quad) {
88
+void FontMapTTF::getQuad(int c, float* xpos, float* ypos, stbtt_aligned_quad* quad) {
89
     assert(contains(c));
89
     assert(contains(c));
90
     stbtt_GetPackedQuad(charInfo, MAP_WIDTH, MAP_HEIGHT, c - begin, xpos, ypos, quad, 0);
90
     stbtt_GetPackedQuad(charInfo, MAP_WIDTH, MAP_HEIGHT, c - begin, xpos, ypos, quad, 0);
91
 }
91
 }
255
         begin -= (MAP_NUM_CHARS / 2);
255
         begin -= (MAP_NUM_CHARS / 2);
256
 
256
 
257
     Log::get(LOG_INFO) << "Unmapped character '" << char(c) << "', new map from " << begin << " to "
257
     Log::get(LOG_INFO) << "Unmapped character '" << char(c) << "', new map from " << begin << " to "
258
-             << begin + MAP_NUM_CHARS - 1 << "..." << Log::endl;
258
+                       << begin + MAP_NUM_CHARS - 1 << "..." << Log::endl;
259
 
259
 
260
     int p = maps.size();
260
     int p = maps.size();
261
     maps.emplace_back();
261
     maps.emplace_back();
266
     return p;
266
     return p;
267
 }
267
 }
268
 
268
 
269
-int FontTTF::getQuad(int c, float* xpos, float* ypos, stbtt_aligned_quad *quad) {
269
+int FontTTF::getQuad(int c, float* xpos, float* ypos, stbtt_aligned_quad* quad) {
270
     if (c < 0) {
270
     if (c < 0) {
271
         //! \todo This has nothing to do with proper UTF8 support...
271
         //! \todo This has nothing to do with proper UTF8 support...
272
         c += 128;
272
         c += 128;

+ 3
- 3
src/system/WindowSDL.cpp 查看文件

74
             controller = SDL_GameControllerOpen(i);
74
             controller = SDL_GameControllerOpen(i);
75
             if (controller) {
75
             if (controller) {
76
                 Log::get(LOG_INFO) << "Using controller \"" << SDL_GameControllerName(controller)
76
                 Log::get(LOG_INFO) << "Using controller \"" << SDL_GameControllerName(controller)
77
-                         << "\"..." << Log::endl;
77
+                                   << "\"..." << Log::endl;
78
                 break;
78
                 break;
79
             } else {
79
             } else {
80
                 Log::get(LOG_WARNING) << "Couldn't open controller \"" << SDL_GameControllerNameForIndex(i)
80
                 Log::get(LOG_WARNING) << "Couldn't open controller \"" << SDL_GameControllerNameForIndex(i)
81
-                         << "\"!" << Log::endl;
81
+                                      << "\"!" << Log::endl;
82
             }
82
             }
83
         } else {
83
         } else {
84
             Log::get(LOG_WARNING) << "Joystick \"" << SDL_JoystickNameForIndex(i)
84
             Log::get(LOG_WARNING) << "Joystick \"" << SDL_JoystickNameForIndex(i)
85
-                     << "\" is no compatible controller!" << Log::endl;
85
+                                  << "\" is no compatible controller!" << Log::endl;
86
         }
86
         }
87
     }
87
     }
88
 
88
 

+ 2
- 1
src/utils/FolderRecursive.cpp 查看文件

63
     return files.at(0);
63
     return files.at(0);
64
 }
64
 }
65
 
65
 
66
-void Folder::findRecursiveFilesEndingWith(std::vector<File>& found, std::string end, bool casesensitive) {
66
+void Folder::findRecursiveFilesEndingWith(std::vector<File>& found, std::string end,
67
+        bool casesensitive) {
67
     createFolderItems();
68
     createFolderItems();
68
     for (unsigned long i = 0; i < countRecursiveFiles(); i++) {
69
     for (unsigned long i = 0; i < countRecursiveFiles(); i++) {
69
         if (stringEndsWith(getRecursiveFile(i).getName(), end, casesensitive)) {
70
         if (stringEndsWith(getRecursiveFile(i).getName(), end, casesensitive)) {

+ 4
- 2
src/utils/pcx.cpp 查看文件

31
     }
31
     }
32
 
32
 
33
     if (header[0] != 0x0A) {
33
     if (header[0] != 0x0A) {
34
-        Log::get(LOG_ERROR) << "Magic number at file start is wrong (" << header[0] << " != 0x0A)" << Log::endl;
34
+        Log::get(LOG_ERROR) << "Magic number at file start is wrong (" << header[0] << " != 0x0A)" <<
35
+                            Log::endl;
35
         delete [] header;
36
         delete [] header;
36
         return -2;
37
         return -2;
37
     }
38
     }
89
     }
90
     }
90
 
91
 
91
     if (header[0] != 0x0A) {
92
     if (header[0] != 0x0A) {
92
-        Log::get(LOG_ERROR) << "Magic number at file start is wrong (" << header[0] << " != 0x0A)" << Log::endl;
93
+        Log::get(LOG_ERROR) << "Magic number at file start is wrong (" << header[0] << " != 0x0A)" <<
94
+                            Log::endl;
93
         delete [] header;
95
         delete [] header;
94
         return -2;
96
         return -2;
95
     }
97
     }

Loading…
取消
儲存