mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-15 01:15:55 +08:00
Remove bad pracise to move const data for emboss
This commit is contained in:
parent
5800d21ad6
commit
a9bfef6ca6
@ -431,7 +431,7 @@ std::optional<std::wstring> Emboss::get_font_path(const std::wstring &font_face_
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
std::unique_ptr<Emboss::Font> Emboss::load_font(const std::vector<unsigned char>&& data)
|
std::unique_ptr<Emboss::Font> Emboss::load_font(std::vector<unsigned char>&& data)
|
||||||
{
|
{
|
||||||
unsigned int collection_size = 0;
|
unsigned int collection_size = 0;
|
||||||
int font_offset = 0;
|
int font_offset = 0;
|
||||||
|
@ -67,7 +67,7 @@ public:
|
|||||||
|
|
||||||
Emboss::Glyphs cache; // cache of glyphs
|
Emboss::Glyphs cache; // cache of glyphs
|
||||||
|
|
||||||
Font(const std::vector<unsigned char> &&buffer,
|
Font(std::vector<unsigned char> &&buffer,
|
||||||
unsigned int count,
|
unsigned int count,
|
||||||
int ascent,
|
int ascent,
|
||||||
int descent,
|
int descent,
|
||||||
@ -88,7 +88,7 @@ public:
|
|||||||
/// <returns>Font object when loaded.</returns>
|
/// <returns>Font object when loaded.</returns>
|
||||||
static std::unique_ptr<Font> load_font(const char *file_path);
|
static std::unique_ptr<Font> load_font(const char *file_path);
|
||||||
// data = raw file data
|
// data = raw file data
|
||||||
static std::unique_ptr<Font> load_font(const std::vector<unsigned char>&& data);
|
static std::unique_ptr<Font> load_font(std::vector<unsigned char>&& data);
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
// fix for unknown pointer HFONT
|
// fix for unknown pointer HFONT
|
||||||
using HFONT = void*;
|
using HFONT = void*;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user