Compare commits
No commits in common. "6b53eaf6b1d8f4caadea8df8ec6e4c09e37993b4" and "d68e64931b37d7d8bbaff7b43bf131c7acf2aa97" have entirely different histories.
6b53eaf6b1
...
d68e64931b
4
deps/ox/src/ox/std/string.hpp
vendored
4
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);
|
||||||
@ -423,7 +423,7 @@ constexpr BasicString<SmallStringSize_v> BasicString<SmallStringSize_v>::operato
|
|||||||
const std::size_t strLen = src.len();
|
const std::size_t strLen = src.len();
|
||||||
const auto currentLen = len();
|
const auto currentLen = len();
|
||||||
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 + 1);
|
||||||
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);
|
||||||
cpy.m_buff[cpy.m_buff.size() - 1] = 0;
|
cpy.m_buff[cpy.m_buff.size() - 1] = 0;
|
||||||
|
@ -445,7 +445,7 @@ void TileSheetEditorImGui::drawPaletteMenu() noexcept {
|
|||||||
}
|
}
|
||||||
if (ig::DragDropTarget const dragDropTarget; dragDropTarget) {
|
if (ig::DragDropTarget const dragDropTarget; dragDropTarget) {
|
||||||
auto const [ref, err] = ig::getDragDropPayload<studio::FileRef>("FileRef");
|
auto const [ref, err] = ig::getDragDropPayload<studio::FileRef>("FileRef");
|
||||||
if (!err && endsWith(ref.path, FileExt_npal)) {
|
if (!err) {
|
||||||
auto const oldVal = m_selectedPaletteIdx;
|
auto const oldVal = m_selectedPaletteIdx;
|
||||||
std::ignore = ox::findIdx(files.begin(), files.end(), ref.path).moveTo(m_selectedPaletteIdx);
|
std::ignore = ox::findIdx(files.begin(), files.end(), ref.path).moveTo(m_selectedPaletteIdx);
|
||||||
if (oldVal != m_selectedPaletteIdx) {
|
if (oldVal != m_selectedPaletteIdx) {
|
||||||
|
Loading…
Reference in New Issue
Block a user