Changeset 14:f69f443c1a13 in miniini
- Timestamp:
- Sep 22, 2010 12:46:39 PM (3 years ago)
- Branch:
- default
- Location:
- miniini
- Files:
-
- 3 edited
-
include/inisection.h (modified) (1 diff)
-
src/allocator.cpp (modified) (1 diff)
-
src/inisection.cpp (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
miniini/include/inisection.h
r13 r14 321 321 }; 322 322 323 unsigned GetTag(const char* tags, unsigned pos) const; 323 bool GetTag(const char* &tags, unsigned pos) const; 324 bool GetTagValue(const char*& val, unsigned pos) const; 324 325 325 326 unsigned GetTags(const char* tags[], unsigned n) const; -
miniini/src/allocator.cpp
r0 r14 143 143 delete [] Blocks; 144 144 Blocks = tempblocks; 145 NumBlocks++; 145 146 } 146 147 } -
miniini/src/inisection.cpp
r13 r14 94 94 REALLOCATE(tagbuf, tagcap, tagsize, c); 95 95 } 96 //unrolled part of the loop (process 4 chars) 97 FOR_4 98 ( 96 99 97 { 100 98 ch = *currentchar; … … 161 159 ++currentchar; 162 160 } 163 )164 161 } 165 162 } … … 844 841 #endif 845 842 846 bool INISection::GetTag(const char* tags, unsigned pos) const847 { 848 if (pos >= 0 && pos < N)843 bool INISection::GetTag(const char* &tags, unsigned pos) const 844 { 845 if (pos >= 0 && pos < Length) 849 846 { 850 847 tags = Tags[pos]; … … 854 851 } 855 852 853 bool INISection::GetTagValue(const char* &val, unsigned pos) const 854 { 855 if (pos >= 0 && pos < Length) 856 { 857 val = Tags[pos] + strlen(Tags[pos]) + 1; 858 return true; 859 } 860 return false; 861 } 862 856 863 unsigned INISection::GetTags(const char *tags[], unsigned n) const { 857 864
Note: See TracChangeset
for help on using the changeset viewer.
