mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-14 03:05:53 +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
|
||||
|
||||
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;
|
||||
int font_offset = 0;
|
||||
|
@ -67,7 +67,7 @@ public:
|
||||
|
||||
Emboss::Glyphs cache; // cache of glyphs
|
||||
|
||||
Font(const std::vector<unsigned char> &&buffer,
|
||||
Font(std::vector<unsigned char> &&buffer,
|
||||
unsigned int count,
|
||||
int ascent,
|
||||
int descent,
|
||||
@ -88,7 +88,7 @@ public:
|
||||
/// <returns>Font object when loaded.</returns>
|
||||
static std::unique_ptr<Font> load_font(const char *file_path);
|
||||
// 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
|
||||
// fix for unknown pointer HFONT
|
||||
using HFONT = void*;
|
||||
|
Loading…
x
Reference in New Issue
Block a user