mirror of
https://github.com/NoelFB/blah.git
synced 2025-07-18 19:41:52 +08:00
various small C++ warning fixes
This commit is contained in:
@ -11,9 +11,7 @@
|
||||
using namespace Blah;
|
||||
|
||||
Aseprite::Aseprite()
|
||||
{
|
||||
|
||||
}
|
||||
= default;
|
||||
|
||||
Aseprite::Aseprite(const FilePath& path)
|
||||
{
|
||||
@ -77,9 +75,7 @@ Aseprite& Aseprite::operator=(Aseprite&& src) noexcept
|
||||
}
|
||||
|
||||
Aseprite::~Aseprite()
|
||||
{
|
||||
|
||||
}
|
||||
= default;
|
||||
|
||||
void Aseprite::parse(Stream& stream)
|
||||
{
|
||||
|
@ -233,7 +233,7 @@ bool Font::get_image(const Font::Character& ch, Color* pixels) const
|
||||
{
|
||||
// we actually use the image buffer as our temporary buffer, and fill the pixels out backwards after
|
||||
// kinda weird but it works & saves creating more memory
|
||||
unsigned char* src = (unsigned char*)pixels;
|
||||
auto* src = (unsigned char*)pixels;
|
||||
stbtt_MakeGlyphBitmap((stbtt_fontinfo*)m_font, src, ch.width, ch.height, ch.width, ch.scale, ch.scale, ch.glyph);
|
||||
|
||||
int len = ch.width * ch.height;
|
||||
|
@ -96,6 +96,8 @@ Image::Image(const Image& src)
|
||||
|
||||
Image& Image::operator=(const Image& src)
|
||||
{
|
||||
dispose();
|
||||
|
||||
width = src.width;
|
||||
height = src.height;
|
||||
m_stbi_ownership = src.m_stbi_ownership;
|
||||
@ -269,7 +271,7 @@ bool Image::save_jpg(Stream& stream, int quality) const
|
||||
return false;
|
||||
}
|
||||
|
||||
void Image::get_pixels(Color* dest, const Point& dest_pos, const Point& dest_size, RectI source_rect)
|
||||
void Image::get_pixels(Color* dest, const Point& dest_pos, const Point& dest_size, RectI source_rect) const
|
||||
{
|
||||
// can't be outside of the source image
|
||||
if (source_rect.x < 0) source_rect.x = 0;
|
||||
|
Reference in New Issue
Block a user