mirror of
https://github.com/Relintai/pandemonium_engine.git
synced 2024-11-22 00:48:09 +01:00
Updated the logic of a few getters in String.
This commit is contained in:
parent
0ed384eb1c
commit
d357a57ab2
@ -60,7 +60,7 @@ public:
|
||||
_cowdata(p_other._cowdata) {}
|
||||
|
||||
_FORCE_INLINE_ operator T() const {
|
||||
if (unlikely(_index == _cowdata.size())) {
|
||||
if (unlikely(_cowdata.size() == 0)) {
|
||||
return _null;
|
||||
}
|
||||
|
||||
@ -106,7 +106,7 @@ public:
|
||||
_FORCE_INLINE_ char16_t get(int p_index) const { return _cowdata.get(p_index); }
|
||||
_FORCE_INLINE_ void set(int p_index, const char16_t &p_elem) { _cowdata.set(p_index, p_elem); }
|
||||
_FORCE_INLINE_ const char16_t &operator[](int p_index) const {
|
||||
if (unlikely(p_index == _cowdata.size())) {
|
||||
if (unlikely(_cowdata.size() == 0)) {
|
||||
return _null;
|
||||
}
|
||||
|
||||
@ -156,7 +156,7 @@ public:
|
||||
_FORCE_INLINE_ char get(int p_index) const { return _cowdata.get(p_index); }
|
||||
_FORCE_INLINE_ void set(int p_index, const char &p_elem) { _cowdata.set(p_index, p_elem); }
|
||||
_FORCE_INLINE_ const char &operator[](int p_index) const {
|
||||
if (unlikely(p_index == _cowdata.size())) {
|
||||
if (unlikely(_cowdata.size() == 0)) {
|
||||
return _null;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user