Skip to content

Commit d204826

Browse files
authored
Fix review findings
1 parent e1412d4 commit d204826

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

include/cppcore/Common/TStringBase.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,11 +122,12 @@ inline void TStringBase<T>::clear() {
122122
mStringBuffer = nullptr;
123123
mCapacity = InitSize;
124124
}
125-
mSize = 0;
125+
reset();
126126
}
127127

128128
template <class T>
129129
inline void TStringBase<T>::copyFrom(TStringBase<T> &base, const T *ptr, size_t size) {
130+
static_assert(std::is_trivially_copyable_v<T>, "T must be trivially copyable");
130131
if (ptr != nullptr) {
131132
T *targetPtr = base.mBuffer;
132133

0 commit comments

Comments
 (0)