mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-07-31 12:21:59 +08:00
Follow up fixes to build
This commit is contained in:
parent
035406b0af
commit
ce98eede5e
@ -1054,7 +1054,7 @@ void GCodeProcessor::process_file(const std::string& filename, std::function<voi
|
||||
throw Slic3r::RuntimeError(format("Error opening file %1%", filename));
|
||||
|
||||
using namespace bgcode::core;
|
||||
std::vector<uint8_t> cs_buffer(65536);
|
||||
std::vector<std::byte> cs_buffer(65536);
|
||||
const bool is_binary = is_valid_binary_gcode(*file, true, cs_buffer.data(), cs_buffer.size()) == EResult::Success;
|
||||
fclose(file);
|
||||
|
||||
@ -1168,7 +1168,7 @@ void GCodeProcessor::process_binary_file(const std::string& filename, std::funct
|
||||
|
||||
// read file metadata block, if present
|
||||
BlockHeader block_header;
|
||||
std::vector<uint8_t> cs_buffer(65536);
|
||||
std::vector<std::byte> cs_buffer(65536);
|
||||
res = read_next_block_header(*file.f, file_header, block_header, cs_buffer.data(), cs_buffer.size());
|
||||
if (res != EResult::Success)
|
||||
throw Slic3r::RuntimeError(format("Error reading file %1%: %2%", filename, std::string(translate_result(res))));
|
||||
|
@ -894,7 +894,7 @@ ConfigSubstitutions PresetBundle::load_config_file(const std::string &path, Forw
|
||||
FILE* file = boost::nowide::fopen(path.c_str(), "rb");
|
||||
if (file == nullptr)
|
||||
throw Slic3r::RuntimeError(format("Error opening file %1%", path));
|
||||
std::vector<uint8_t> cs_buffer(65536);
|
||||
std::vector<std::byte> cs_buffer(65536);
|
||||
const bool is_binary = bgcode::core::is_valid_binary_gcode(*file, true, cs_buffer.data(), cs_buffer.size()) == bgcode::core::EResult::Success;
|
||||
fclose(file);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user