Compare commits
No commits in common. "a18c5d9294e3bb8491bc0517d1f8b8683b84da9b" and "ba1bf950a864fcd8b8d2c037238113ce8451b877" have entirely different histories.
a18c5d9294
...
ba1bf950a8
8
deps/ox/src/ox/std/string.hpp
vendored
8
deps/ox/src/ox/std/string.hpp
vendored
@ -392,7 +392,7 @@ template<std::size_t SmallStringSize_v>
|
|||||||
constexpr BasicString<SmallStringSize_v> BasicString<SmallStringSize_v>::operator+(const char *str) const noexcept {
|
constexpr BasicString<SmallStringSize_v> BasicString<SmallStringSize_v>::operator+(const char *str) const noexcept {
|
||||||
const std::size_t strLen = ox::strlen(str);
|
const std::size_t strLen = ox::strlen(str);
|
||||||
const auto currentLen = len();
|
const auto currentLen = len();
|
||||||
BasicString<SmallStringSize_v> cpy;
|
BasicString<SmallStringSize_v> cpy(currentLen + strLen);
|
||||||
cpy.m_buff.resize(m_buff.size() + strLen);
|
cpy.m_buff.resize(m_buff.size() + strLen);
|
||||||
ox::listcpy(&cpy.m_buff[0], m_buff.data(), currentLen);
|
ox::listcpy(&cpy.m_buff[0], m_buff.data(), currentLen);
|
||||||
ox::listcpy(&cpy.m_buff[currentLen], str, strLen);
|
ox::listcpy(&cpy.m_buff[currentLen], str, strLen);
|
||||||
@ -425,8 +425,7 @@ constexpr BasicString<SmallStringSize_v> BasicString<SmallStringSize_v>::operato
|
|||||||
BasicString<SmallStringSize_v> cpy(currentLen + strLen);
|
BasicString<SmallStringSize_v> cpy(currentLen + strLen);
|
||||||
cpy.m_buff.resize(m_buff.size() + strLen);
|
cpy.m_buff.resize(m_buff.size() + strLen);
|
||||||
ox::listcpy(&cpy.m_buff[0], m_buff.data(), currentLen);
|
ox::listcpy(&cpy.m_buff[0], m_buff.data(), currentLen);
|
||||||
ox::listcpy(&cpy.m_buff[currentLen], src.data(), strLen);
|
ox::listcpy(&cpy.m_buff[currentLen], src.data(), strLen + 1);
|
||||||
cpy.m_buff[cpy.m_buff.size() - 1] = 0;
|
|
||||||
return cpy;
|
return cpy;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -437,8 +436,7 @@ constexpr BasicString<SmallStringSize_v> BasicString<SmallStringSize_v>::operato
|
|||||||
BasicString<SmallStringSize_v> cpy(currentLen + strLen);
|
BasicString<SmallStringSize_v> cpy(currentLen + strLen);
|
||||||
cpy.m_buff.resize(m_buff.size() + strLen);
|
cpy.m_buff.resize(m_buff.size() + strLen);
|
||||||
ox::listcpy(&cpy.m_buff[0], m_buff.data(), currentLen);
|
ox::listcpy(&cpy.m_buff[0], m_buff.data(), currentLen);
|
||||||
ox::listcpy(&cpy.m_buff[currentLen], src.data(), strLen);
|
ox::listcpy(&cpy.m_buff[currentLen], src.data(), strLen + 1);
|
||||||
cpy.m_buff[cpy.m_buff.size() - 1] = 0;
|
|
||||||
return cpy;
|
return cpy;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user