Compare commits
4 Commits
2f340b13b2
...
master
Author | SHA1 | Date | |
---|---|---|---|
517432679b | |||
b31c01f724 | |||
f41213f13f | |||
28be7c4650 |
4
deps/ox/src/ox/fs/filesystem/filesystem.hpp
vendored
4
deps/ox/src/ox/fs/filesystem/filesystem.hpp
vendored
@@ -87,7 +87,7 @@ class FileSystem {
|
||||
return writeFilePath(path, buffer, size, FileType::NormalFile);
|
||||
}
|
||||
|
||||
Error write(StringViewCR path, ox::Span<char> const&buff) noexcept {
|
||||
Error write(StringViewCR path, ox::SpanView<char> const&buff) noexcept {
|
||||
return write(path, buff.data(), buff.size(), FileType::NormalFile);
|
||||
}
|
||||
|
||||
@@ -95,7 +95,7 @@ class FileSystem {
|
||||
return write(inode, buffer, size, FileType::NormalFile);
|
||||
}
|
||||
|
||||
Error write(uint64_t inode, ox::Span<char> const&buff) noexcept {
|
||||
Error write(uint64_t inode, ox::SpanView<char> const&buff) noexcept {
|
||||
return write(inode, buff.data(), buff.size(), FileType::NormalFile);
|
||||
}
|
||||
|
||||
|
4
deps/ox/src/ox/std/trace.hpp
vendored
4
deps/ox/src/ox/std/trace.hpp
vendored
@@ -268,7 +268,7 @@ using TraceStream = NullStream;
|
||||
|
||||
inline void logError(const char *file, int line, const char *fmt, const Error &err) noexcept {
|
||||
if (err) {
|
||||
TraceStream trc(file, line, "ox::error");
|
||||
TraceStream trc(file, line, "ox.error");
|
||||
if (err.src.file_name() != nullptr) {
|
||||
trc << "Error: (" << err.src.file_name() << ":" << err.src.line() << "):";
|
||||
} else {
|
||||
@@ -280,7 +280,7 @@ inline void logError(const char *file, int line, const char *fmt, const Error &e
|
||||
|
||||
inline void logError(const char *file, int line, const Error &err) noexcept {
|
||||
if (err) {
|
||||
TraceStream trc(file, line, "ox::error");
|
||||
TraceStream trc(file, line, "ox.error");
|
||||
trc << "Error:" << err;
|
||||
if (err.src.file_name() != nullptr) {
|
||||
trc << "(" << err.src.file_name() << ":" << err.src.line() << ")";
|
||||
|
@@ -5,6 +5,13 @@
|
||||
#pragma once
|
||||
|
||||
#include <ox/std/error.hpp>
|
||||
#include <ox/std/span.hpp>
|
||||
#include <ox/std/stringview.hpp>
|
||||
|
||||
#include <studio/project.hpp>
|
||||
|
||||
#include <nostalgia/gfx/palette.hpp>
|
||||
#include <nostalgia/gfx/tilesheet.hpp>
|
||||
|
||||
namespace nostalgia::gfx {
|
||||
|
||||
|
@@ -3,7 +3,6 @@
|
||||
*/
|
||||
|
||||
#include <imgui.h>
|
||||
#include <lodepng.h>
|
||||
|
||||
#include <ox/std/point.hpp>
|
||||
#include <keel/media.hpp>
|
||||
|
@@ -187,7 +187,7 @@ static ox::Error copy(
|
||||
OX_DEFER [&status] {
|
||||
oxOutf(" {}\n", status);
|
||||
};
|
||||
OX_REQUIRE_M(buff, src.read(currentFile));
|
||||
OX_REQUIRE(buff, src.read(currentFile));
|
||||
// write file to dest
|
||||
OX_RETURN_ERROR(dest.write(currentFile, buff));
|
||||
status = "OK";
|
||||
|
@@ -31,7 +31,7 @@ ox::Result<T> getDragDropPayload(ox::CStringViewCR name) noexcept {
|
||||
return ox::Error(1, "No drag/drop payload");
|
||||
}
|
||||
return ox::readClaw<T>({
|
||||
reinterpret_cast<char const*>(payload->Data),
|
||||
std::launder(reinterpret_cast<char const*>(payload->Data)),
|
||||
static_cast<size_t>(payload->DataSize)});
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user