Changeset 2096
- Timestamp:
- Nov 20, 2012, 1:23:09 AM (10 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/Makefile.am
r2084 r2096 18 18 \ 19 19 lol/unit.h lol/debug.h \ 20 lol/core/array.h lol/core/string.h \ 20 21 lol/math/vector.h lol/math/half.h lol/math/real.h lol/math/remez.h \ 21 22 lol/math/math.h \ -
trunk/src/lol/core/string.h
r2089 r2096 45 45 } 46 46 47 inline String(String const &s) 48 : Super((Super const &)s) 49 { 50 } 51 47 52 inline char &operator [](int n) 48 53 { … … 55 60 } 56 61 57 inline String operator +(String const &s) 62 inline int Count() const 63 { 64 return ((Super const &)*this).Count() - 1; 65 } 66 67 inline String operator +(String const &s) const 58 68 { 59 69 String ret(*this); … … 68 78 return *this; 69 79 } 80 81 inline String operator +(char c) const 82 { 83 String ret(*this); 84 return ret += c; 85 } 86 87 inline String operator +=(char c) 88 { 89 ((Super &)*this).Last() = c; 90 ((Super &)*this).Push('\0'); 91 return *this; 92 } 93 94 inline bool operator ==(String const &s) const 95 { 96 if (this->m_count != s.m_count) 97 return false; 98 99 for (int i = 0; i < this->m_count; ++i) 100 if ((*this)[i] != s[i]) 101 return false; 102 103 return true; 104 } 105 106 inline bool operator !=(String const &s) const 107 { 108 return !(*this == s); 109 } 70 110 }; 71 111 -
trunk/test/Makefile.am
r2084 r2096 23 23 unit/vector.cpp unit/matrix.cpp unit/half.cpp unit/trig.cpp \ 24 24 unit/build.cpp unit/real.cpp unit/image.cpp unit/quat.cpp unit/cmplx.cpp \ 25 unit/array.cpp unit/rotation.cpp 25 unit/array.cpp unit/rotation.cpp unit/string.cpp 26 26 testsuite_CPPFLAGS = @LOL_CFLAGS@ 27 27 testsuite_LDFLAGS = $(top_builddir)/src/liblol.a @LOL_LIBS@
Note: See TracChangeset
for help on using the changeset viewer.