mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-09-13 03:57:34 +00:00
build: clear 12 platform-gated warnings the x64 census could not see (#15633)
This commit is contained in:
@@ -4981,7 +4981,7 @@ static void apply_mixed_config_relocations(DynamicPrintConfig&
|
||||
case coBools: {
|
||||
auto* live = static_cast<ConfigOptionBools*>(opt);
|
||||
const auto* frozen = static_cast<const ConfigOptionBools*>(snapshot.get());
|
||||
for (const auto [from, to] : moves) {
|
||||
for (const auto& [from, to] : moves) {
|
||||
const unsigned char cell = from < frozen->values.size() ? frozen->values[from] : 0;
|
||||
if (live->values.size() <= to)
|
||||
live->values.resize(to + 1, 0);
|
||||
@@ -4992,7 +4992,7 @@ static void apply_mixed_config_relocations(DynamicPrintConfig&
|
||||
case coStrings: {
|
||||
auto* live = static_cast<ConfigOptionStrings*>(opt);
|
||||
const auto* frozen = static_cast<const ConfigOptionStrings*>(snapshot.get());
|
||||
for (const auto [from, to] : moves) {
|
||||
for (const auto& [from, to] : moves) {
|
||||
const std::string cell = from < frozen->values.size() ? frozen->values[from] : std::string();
|
||||
if (live->values.size() <= to)
|
||||
live->values.resize(to + 1, std::string{});
|
||||
@@ -5028,7 +5028,7 @@ static void apply_receiver_mix_relocations(DynamicPrintConfig&
|
||||
auto* live = static_cast<ConfigOptionBools*>(opt);
|
||||
std::unique_ptr<ConfigOption> snapshot(opt->clone());
|
||||
const auto* frozen = static_cast<const ConfigOptionBools*>(snapshot.get());
|
||||
for (const auto [from, to] : moves) {
|
||||
for (const auto& [from, to] : moves) {
|
||||
const bool cell = from < frozen->values.size() ? frozen->values[from] : false;
|
||||
if (live->values.size() <= to)
|
||||
live->values.resize(to + 1, false);
|
||||
@@ -5044,7 +5044,7 @@ static void apply_receiver_mix_relocations(DynamicPrintConfig&
|
||||
auto* live = static_cast<ConfigOptionStrings*>(opt);
|
||||
std::unique_ptr<ConfigOption> snapshot(opt->clone());
|
||||
const auto* frozen = static_cast<const ConfigOptionStrings*>(snapshot.get());
|
||||
for (const auto [from, to] : moves) {
|
||||
for (const auto& [from, to] : moves) {
|
||||
const std::string cell = from < frozen->values.size() ? frozen->values[from] : std::string();
|
||||
if (live->values.size() <= to)
|
||||
live->values.resize(to + 1, std::string{});
|
||||
@@ -5060,7 +5060,7 @@ static void apply_receiver_mix_relocations(DynamicPrintConfig&
|
||||
auto* live = static_cast<ConfigOptionInts*>(opt);
|
||||
std::unique_ptr<ConfigOption> snapshot(opt->clone());
|
||||
const auto* frozen = static_cast<const ConfigOptionInts*>(snapshot.get());
|
||||
for (const auto [from, to] : moves) {
|
||||
for (const auto& [from, to] : moves) {
|
||||
const int cell = from < frozen->values.size() ? frozen->values[from] : 0;
|
||||
if (live->values.size() <= to)
|
||||
live->values.resize(to + 1, 0);
|
||||
@@ -5087,7 +5087,7 @@ static void apply_receiver_mix_relocations(DynamicPrintConfig&
|
||||
move_ints("filament_volume_map");
|
||||
{
|
||||
const std::vector<std::vector<std::string>> frozen = ams_multi_color_filment;
|
||||
for (const auto [from, to] : moves) {
|
||||
for (const auto& [from, to] : moves) {
|
||||
const std::vector<std::string> cell = from < frozen.size() ? frozen[from] : std::vector<std::string>();
|
||||
if (ams_multi_color_filment.size() <= to)
|
||||
ams_multi_color_filment.resize(to + 1, std::vector<std::string>{});
|
||||
|
||||
@@ -30,6 +30,11 @@ static HMODULE s_hKernel32 = nullptr;
|
||||
static SetThreadDescriptionType s_fnSetThreadDescription = nullptr;
|
||||
static GetThreadDescriptionType s_fnGetThreadDescription = nullptr;
|
||||
|
||||
// Convert the FARPROC from GetProcAddress to Fn through a generic function pointer.
|
||||
template<typename Fn> static Fn load_proc(HMODULE module, const char* name) {
|
||||
return reinterpret_cast<Fn>(reinterpret_cast<void(*)()>(::GetProcAddress(module, name)));
|
||||
}
|
||||
|
||||
static bool WindowsGetSetThreadNameAPIInitialize()
|
||||
{
|
||||
if (! s_SetGetThreadDescriptionInitialized) {
|
||||
@@ -37,8 +42,8 @@ static bool WindowsGetSetThreadNameAPIInitialize()
|
||||
// to initialize
|
||||
s_hKernel32 = LoadLibraryW(L"Kernel32.dll");
|
||||
if (s_hKernel32) {
|
||||
s_fnSetThreadDescription = (SetThreadDescriptionType)::GetProcAddress(s_hKernel32, "SetThreadDescription");
|
||||
s_fnGetThreadDescription = (GetThreadDescriptionType)::GetProcAddress(s_hKernel32, "GetThreadDescription");
|
||||
s_fnSetThreadDescription = load_proc<SetThreadDescriptionType>(s_hKernel32, "SetThreadDescription");
|
||||
s_fnGetThreadDescription = load_proc<GetThreadDescriptionType>(s_hKernel32, "GetThreadDescription");
|
||||
}
|
||||
s_SetGetThreadDescriptionInitialized = true;
|
||||
}
|
||||
|
||||
@@ -87,7 +87,6 @@ private:
|
||||
std::condition_variable m_thread_stop_condition;
|
||||
mutable std::mutex m_thread_stop_mutex;
|
||||
bool m_stop{ false };
|
||||
bool m_start{ true };
|
||||
|
||||
// background thread method
|
||||
void listen();
|
||||
|
||||
@@ -183,7 +183,9 @@ private:
|
||||
HyperLink* m_hyperlink{nullptr}; // ORCA
|
||||
wxBoxSizer * m_sizer_my_devices{nullptr};
|
||||
wxBoxSizer * m_sizer_other_devices{nullptr};
|
||||
#if defined(__WINDOWS__)
|
||||
wxBoxSizer * m_sizer_search_bar{nullptr};
|
||||
#endif
|
||||
wxSearchCtrl* m_search_bar{nullptr};
|
||||
wxScrolledWindow * m_scrolledWindow{nullptr};
|
||||
wxTimer * m_refresh_timer{nullptr};
|
||||
|
||||
@@ -134,7 +134,9 @@ public:
|
||||
}
|
||||
|
||||
private:
|
||||
#if defined(__WXMSW__) || defined(__APPLE__)
|
||||
int m_suspended_count = 0;
|
||||
#endif
|
||||
};
|
||||
|
||||
static bool needs_filament_swatch_border(const wxColour& colour)
|
||||
|
||||
@@ -331,7 +331,9 @@ void Serial::set_baud_rate(unsigned baud_rate)
|
||||
speed_t c_ispeed;
|
||||
speed_t c_ospeed;
|
||||
};
|
||||
#ifndef BOTHER
|
||||
#define BOTHER CBAUDEX
|
||||
#endif
|
||||
|
||||
termios2 ios;
|
||||
handle_errno(::ioctl(handle, TCGETS2, &ios));
|
||||
|
||||
Reference in New Issue
Block a user