• R/O
  • SSH
  • HTTPS

gtaconfig: 提交


Commit MetaInfo

修訂38 (tree)
時間2019-07-21 05:39:50
作者quiret

Log Message

- improved CSyntax::ScanCharacterObvious

Change Summary

差異

--- include/gtaconfig/syntax.h (revision 37)
+++ include/gtaconfig/syntax.h (revision 38)
@@ -802,14 +802,18 @@
802802
803803 return false;
804804 }
805- const encodingCharType* ScanCharacterObvious(char c)
805+ const encodingCharType* ScanCharacterObvious(char c, bool *did_find = nullptr)
806806 {
807807 const encodingCharType *cur_res = ( this->m_buffer + this->m_offset );
808808
809+ bool has_actually_found = false;
810+
809811 while ( !Finished() )
810812 {
811813 if ( ReadNextSimple() == c )
812814 {
815+ has_actually_found = true;
816+
813817 break;
814818 }
815819
@@ -816,6 +820,11 @@
816820 cur_res = ( this->m_buffer + this->m_offset );
817821 }
818822
823+ if ( did_find )
824+ {
825+ *did_find = has_actually_found;
826+ }
827+
819828 return cur_res;
820829 }
821830 bool ScanCharacterEx(char c, bool ignoreName, bool ignoreNumber, bool ignoreNewline)
Show on old repository browser