forked from Green-Sky/tomato
fix more warnings
This commit is contained in:
@@ -65,7 +65,7 @@ std::optional<TextureEntry> BitsetImageLoader::haveToTexture(TextureUploaderI& t
|
|||||||
BitsetImageLoader::BitsetImageLoader(void) {
|
BitsetImageLoader::BitsetImageLoader(void) {
|
||||||
}
|
}
|
||||||
|
|
||||||
TextureLoaderResult BitsetImageLoader::load(TextureUploaderI& tu, ObjectHandle o, uint32_t w, uint32_t h) {
|
TextureLoaderResult BitsetImageLoader::load(TextureUploaderI& tu, ObjectHandle o, uint32_t /*w*/, uint32_t /*h*/) {
|
||||||
if (!static_cast<bool>(o)) {
|
if (!static_cast<bool>(o)) {
|
||||||
std::cerr << "BIL error: trying to load invalid object\n";
|
std::cerr << "BIL error: trying to load invalid object\n";
|
||||||
return {};
|
return {};
|
||||||
|
|||||||
@@ -89,8 +89,8 @@ std::vector<uint8_t> ImageEncoderSTBPNG::encodeToMemoryRGBA(const ImageResult& i
|
|||||||
struct Context {
|
struct Context {
|
||||||
std::vector<uint8_t> new_data;
|
std::vector<uint8_t> new_data;
|
||||||
} context;
|
} context;
|
||||||
auto write_f = +[](void* context, void* data, int size) -> void {
|
auto write_f = +[](void* context_, void* data, int size) -> void {
|
||||||
Context* ctx = reinterpret_cast<Context*>(context);
|
Context* ctx = reinterpret_cast<Context*>(context_);
|
||||||
uint8_t* d = reinterpret_cast<uint8_t*>(data);
|
uint8_t* d = reinterpret_cast<uint8_t*>(data);
|
||||||
ctx->new_data.insert(ctx->new_data.cend(), d, d + size);
|
ctx->new_data.insert(ctx->new_data.cend(), d, d + size);
|
||||||
};
|
};
|
||||||
@@ -126,8 +126,8 @@ std::vector<uint8_t> ImageEncoderSTBJpeg::encodeToMemoryRGBA(const ImageResult&
|
|||||||
struct Context {
|
struct Context {
|
||||||
std::vector<uint8_t> new_data;
|
std::vector<uint8_t> new_data;
|
||||||
} context;
|
} context;
|
||||||
auto write_f = +[](void* context, void* data, int size) -> void {
|
auto write_f = +[](void* context_, void* data, int size) -> void {
|
||||||
Context* ctx = reinterpret_cast<Context*>(context);
|
Context* ctx = reinterpret_cast<Context*>(context_);
|
||||||
uint8_t* d = reinterpret_cast<uint8_t*>(data);
|
uint8_t* d = reinterpret_cast<uint8_t*>(data);
|
||||||
ctx->new_data.insert(ctx->new_data.cend(), d, d + size);
|
ctx->new_data.insert(ctx->new_data.cend(), d, d + size);
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user