Skip to content

Commit a817fdb

Browse files
author
Swagtoy
committed
Early return if the string is the same
1 parent 6966688 commit a817fdb

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

irr/include/irrString.h

+3
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,9 @@ class string
172172
clear();
173173
return *this;
174174
}
175+
176+
if ((void*)c == (void*)c_str())
177+
return *this;
175178

176179
u32 len = calclen(c);
177180
// In case `c` is a pointer to our own buffer, we may not resize first

0 commit comments

Comments
 (0)