From 4fb7856b5ac6851a5c9f1afdf047c0be96bea6de Mon Sep 17 00:00:00 2001 From: Relintai Date: Thu, 22 Dec 2022 20:03:28 +0100 Subject: [PATCH] Remove now superfluos check from String's operator[]. --- core/string/ustring.h | 4 ---- 1 file changed, 4 deletions(-) diff --git a/core/string/ustring.h b/core/string/ustring.h index d56e3dbd9..572b3bdef 100644 --- a/core/string/ustring.h +++ b/core/string/ustring.h @@ -231,10 +231,6 @@ public: } _FORCE_INLINE_ const CharType &operator[](int p_index) const { - if (unlikely(p_index == _cowdata.size())) { - return _null; - } - return _cowdata.get(p_index); } _FORCE_INLINE_ CharProxy operator[](int p_index) { return CharProxy(p_index, _cowdata); }