mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-02 03:50:40 +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));
|
throw Slic3r::RuntimeError(format("Error opening file %1%", filename));
|
||||||
|
|
||||||
using namespace bgcode::core;
|
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;
|
const bool is_binary = is_valid_binary_gcode(*file, true, cs_buffer.data(), cs_buffer.size()) == EResult::Success;
|
||||||
fclose(file);
|
fclose(file);
|
||||||
|
|
||||||
@ -1168,7 +1168,7 @@ void GCodeProcessor::process_binary_file(const std::string& filename, std::funct
|
|||||||
|
|
||||||
// read file metadata block, if present
|
// read file metadata block, if present
|
||||||
BlockHeader block_header;
|
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());
|
res = read_next_block_header(*file.f, file_header, block_header, cs_buffer.data(), cs_buffer.size());
|
||||||
if (res != EResult::Success)
|
if (res != EResult::Success)
|
||||||
throw Slic3r::RuntimeError(format("Error reading file %1%: %2%", filename, std::string(translate_result(res))));
|
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");
|
FILE* file = boost::nowide::fopen(path.c_str(), "rb");
|
||||||
if (file == nullptr)
|
if (file == nullptr)
|
||||||
throw Slic3r::RuntimeError(format("Error opening file %1%", path));
|
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;
|
const bool is_binary = bgcode::core::is_valid_binary_gcode(*file, true, cs_buffer.data(), cs_buffer.size()) == bgcode::core::EResult::Success;
|
||||||
fclose(file);
|
fclose(file);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user