Changeset 2100
- Timestamp:
- Nov 21, 2012, 1:34:09 AM (11 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/Makefile.am
r2098 r2100 41 41 $(bullet_sources) \ 42 42 \ 43 core/hash.cpp \43 core/hash.cpp core/string.cpp \ 44 44 \ 45 45 thread/threadbase.h thread/thread.h \ -
trunk/src/lol/core/string.h
r2096 r2100 71 71 } 72 72 73 inline String operator +=(String const &s)73 inline String& operator +=(String const &s) 74 74 { 75 75 /* Be careful, we have a trailing zero we don't want! */ … … 85 85 } 86 86 87 inline String operator +=(char c)87 inline String& operator +=(char c) 88 88 { 89 89 ((Super &)*this).Last() = c; … … 108 108 return !(*this == s); 109 109 } 110 111 #ifdef __GNUC__ 112 # define LOL_FMT_ATTR(n, p) __attribute__((format(printf, n, p))) 113 #else 114 # define LOL_FMT_ATTR(n, p) 115 #endif 116 static String Printf(char const *format, ...) LOL_FMT_ATTR(1, 2); 117 #undef LOL_FMT_ATTR 110 118 }; 111 119 -
trunk/src/lolcore.vcxproj
r2097 r2100 236 236 <ClCompile Include="camera.cpp" /> 237 237 <ClCompile Include="core\hash.cpp" /> 238 <ClCompile Include="core\string.cpp" /> 238 239 <ClCompile Include="debug\fps.cpp" /> 239 240 <ClCompile Include="debug\record.cpp" /> -
trunk/src/lolcore.vcxproj.filters
r2077 r2100 12 12 <UniqueIdentifier>{e056731c-5484-434a-965e-801c199c0366}</UniqueIdentifier> 13 13 </Filter> 14 <Filter Include="src\core"> 15 <UniqueIdentifier>{a63b1fd6-3747-4a9f-9bd7-3f942133ad6b}</UniqueIdentifier> 16 </Filter> 14 17 <Filter Include="src\platform"> 15 18 <UniqueIdentifier>{a11c55f8-8e10-4270-be24-38e8d4fcf589}</UniqueIdentifier> … … 180 183 </ClCompile> 181 184 <ClCompile Include="hash.cpp"> 182 <Filter>src\...</Filter> 185 <Filter>src\core</Filter> 186 </ClCompile> 187 <ClCompile Include="string.cpp"> 188 <Filter>src\core</Filter> 183 189 </ClCompile> 184 190 <ClCompile Include="layer.cpp"> -
trunk/test/unit/string.cpp
r2096 r2100 121 121 LOLUNIT_ASSERT(!(s1 != s3)); 122 122 } 123 124 LOLUNIT_TEST(StringPrintf) 125 { 126 String s1 = "3a"; 127 String s2 = String::Printf("%d%x", 3, 10); 128 129 LOLUNIT_ASSERT(s1 == s2); 130 } 123 131 }; 124 132
Note: See TracChangeset
for help on using the changeset viewer.