• R/O
  • SSH
  • HTTPS

gtaconfig: Commit


Commit MetaInfo

Revision8 (tree)
Time2018-01-19 20:05:33
Authorquiret

Log Message

- added Code::Blocks project
- adjusted some stuff to make GCC happy

Change Summary

Incremental Difference

--- src/StdInc.h (revision 7)
+++ src/StdInc.h (revision 8)
@@ -1,4 +1,6 @@
1-#pragma warning(disable: 4996)
1+#ifdef _MSC_VER
2+#pragma warning(disable: 4996)
3+#endif //_MSC_VER
24
35 #include <CFileSystemInterface.h>
46
@@ -5,4 +7,4 @@
57 #include "../include/gtaconfig/include.h"
68
79 // gtaconfig would like to have a global called "fileRoot".
8-extern CFileTranslator *fileRoot;
\ No newline at end of file
10+extern CFileTranslator *fileRoot;
--- src/syntax.cpp (revision 7)
+++ src/syntax.cpp (revision 8)
@@ -83,7 +83,7 @@
8383 do
8484 {
8585 if ( Finished() )
86- return NULL;
86+ return nullptr;
8787
8888 read = ReadNext();
8989
@@ -97,7 +97,7 @@
9797 // If we are on space chars then we are nothing.
9898 if ( IsSpace( read ) )
9999 {
100- return NULL;
100+ return nullptr;
101101 }
102102
103103 // Check if it a pure name.
@@ -223,7 +223,7 @@
223223
224224 // If we found no numeric at all, we ain't a number.
225225 if ( !didHaveNumeric )
226- return NULL;
226+ return nullptr;
227227
228228 // Check that the thing is really a number.
229229 if ( !Finished() )
@@ -232,7 +232,7 @@
232232 // Check that this is not the case.
233233 if ( IsName( c ) )
234234 {
235- return NULL;
235+ return nullptr;
236236 }
237237
238238 // Seek to prior before the end test.
@@ -245,7 +245,7 @@
245245
246246 const char* CSyntax::ParseTokenOfType(size_t *len, eTokenType expectType, bool parseDirect)
247247 {
248- size_t reset_off = this->GetOffset();
248+ //size_t reset_off = this->GetOffset();
249249
250250 eTokenType tokType;
251251 size_t tokLen;
@@ -252,10 +252,10 @@
252252 const char *tok = this->ParseTokenEx( &tokLen, tokType, parseDirect );
253253
254254 if ( !tok )
255- return NULL;
255+ return nullptr;
256256
257257 if ( tokType != expectType )
258- return NULL;
258+ return nullptr;
259259
260260 *len = tokLen;
261261 return tok;
@@ -358,13 +358,11 @@
358358 bool CSyntax::HasTokenSequence(const char *tokens, bool isDirect, bool caseSensitive, bool concat)
359359 {
360360 size_t begOff = this->GetOffset();
361-
361+
362362 bool hadPrevToken = ( concat == true );
363363
364364 while ( *tokens != '\0' )
365365 {
366- size_t lastOff = this->GetOffset();
367-
368366 eTokenType tokType;
369367 size_t tokLen;
370368 const char *tok = ParseTokenEx( &tokLen, tokType, hadPrevToken && isDirect );
@@ -437,8 +435,10 @@
437435 {
438436 bool skipped = SkipWhitespace();
439437
440- if ( !skipped )
441- return false;
438+ if ( !skipped )
439+ {
440+ return false;
441+ }
442442
443443 char read = this->ReadNext();
444444
Show on old repository browser