mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-10-19 05:31:04 +00:00
Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0c4897e677 | ||
|
|
7c70300ec5 |
No files matched your search
+20
-2
@@ -1,5 +1,5 @@
|
|||||||
# clang-tidy configuration, enforced by the clang-tidy CI job on the lines a pull
|
# clang-tidy configuration, enforced by the clang-tidy CI job on the lines a pull
|
||||||
# request changes (scripts/clang_tidy_diff.py). Two things are reported.
|
# request changes (scripts/clang_tidy_diff.py). Three things are reported.
|
||||||
# Missing includes: a file should include the header for every symbol it uses, not
|
# Missing includes: a file should include the header for every symbol it uses, not
|
||||||
# rely on the precompiled header or another header's includes. Run with --fix to
|
# rely on the precompiled header or another header's includes. Run with --fix to
|
||||||
# add them.
|
# add them.
|
||||||
@@ -7,11 +7,29 @@
|
|||||||
# they reach every file that includes the header, and a using-declaration also
|
# they reach every file that includes the header, and a using-declaration also
|
||||||
# makes the header look like the one to include for that name. Qualify the name
|
# makes the header look like the one to include for that name. Qualify the name
|
||||||
# in the header, and put the using in the source files that want it.
|
# in the header, and put the using in the source files that want it.
|
||||||
|
# Likely bugs: an RAII object or a return value thrown away, an integer stored
|
||||||
|
# as a character in a string, std::move on a forwarding reference, iteration
|
||||||
|
# whose order depends on pointer values, and a condition already known true.
|
||||||
# Every check listed here gates pull requests, so enable a new one only once the
|
# Every check listed here gates pull requests, so enable a new one only once the
|
||||||
# code it flags on touched lines is reasonable to fix in passing.
|
# code it flags on touched lines is reasonable to fix in passing.
|
||||||
Checks: '-*,misc-include-cleaner,google-global-names-in-headers'
|
Checks: >-
|
||||||
|
-*,
|
||||||
|
misc-include-cleaner,
|
||||||
|
google-global-names-in-headers,
|
||||||
|
bugprone-move-forwarding-reference,
|
||||||
|
bugprone-nondeterministic-pointer-iteration-order,
|
||||||
|
bugprone-redundant-branch-condition,
|
||||||
|
bugprone-string-integer-assignment,
|
||||||
|
bugprone-unused-raii,
|
||||||
|
bugprone-unused-return-value
|
||||||
WarningsAsErrors: '*'
|
WarningsAsErrors: '*'
|
||||||
CheckOptions:
|
CheckOptions:
|
||||||
|
# (void) marks a result dropped on purpose, such as a deliberate leak through
|
||||||
|
# unique_ptr::release().
|
||||||
|
bugprone-unused-return-value.AllowCastToVoid: true
|
||||||
|
# The default list without boost::system::error_code: Boost.Asio's overloads
|
||||||
|
# that take an error_code& also return it, and callers check the argument.
|
||||||
|
bugprone-unused-return-value.CheckedReturnTypes: '^::std::error_code$;^::std::error_condition$;^::std::errc$;^::std::expected$'
|
||||||
# Missing includes only. Builds without the precompiled header break on these.
|
# Missing includes only. Builds without the precompiled header break on these.
|
||||||
misc-include-cleaner.UnusedIncludes: false
|
misc-include-cleaner.UnusedIncludes: false
|
||||||
# Headers that declare a symbol but are not the one to include: per-platform
|
# Headers that declare a symbol but are not the one to include: per-platform
|
||||||
|
|||||||
@@ -6865,7 +6865,6 @@ LayerResult GCode::process_layer(
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (support_dontcare)
|
|
||||||
support_extruder = dontcare_extruder;
|
support_extruder = dontcare_extruder;
|
||||||
}
|
}
|
||||||
else if (support_dontcare || interface_dontcare) {
|
else if (support_dontcare || interface_dontcare) {
|
||||||
|
|||||||
@@ -248,7 +248,7 @@ inline void polylines_merge(PointsType &dst, bool dst_first, PointsType &&src, b
|
|||||||
} else if (! src_first)
|
} else if (! src_first)
|
||||||
std::reverse(src.begin(), src.end());
|
std::reverse(src.begin(), src.end());
|
||||||
// Merge src into dst.
|
// Merge src into dst.
|
||||||
append(dst, std::move(src));
|
append(dst, std::forward<PointsType>(src));
|
||||||
}
|
}
|
||||||
|
|
||||||
const Point& leftmost_point(const Polylines &polylines);
|
const Point& leftmost_point(const Polylines &polylines);
|
||||||
|
|||||||
@@ -3386,6 +3386,7 @@ void PresetBundle::load_installed_filaments(AppConfig &config)
|
|||||||
// compatible_filaments.insert(&filament);
|
// compatible_filaments.insert(&filament);
|
||||||
}
|
}
|
||||||
// and mark these filaments as installed, therefore this code will not be executed at the next start of the application.
|
// and mark these filaments as installed, therefore this code will not be executed at the next start of the application.
|
||||||
|
// NOLINTNEXTLINE(bugprone-nondeterministic-pointer-iteration-order) - each is set by name, so only the log order varies
|
||||||
for (const auto &filament: compatible_filaments) {
|
for (const auto &filament: compatible_filaments) {
|
||||||
BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << boost::format(": set filament %1% to visible by default")%filament->name;
|
BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << boost::format(": set filament %1% to visible by default")%filament->name;
|
||||||
config.set(AppConfig::SECTION_FILAMENTS, filament->name, "true");
|
config.set(AppConfig::SECTION_FILAMENTS, filament->name, "true");
|
||||||
@@ -3412,6 +3413,7 @@ void PresetBundle::load_installed_sla_materials(AppConfig &config)
|
|||||||
comp_sla_materials.insert(&material);
|
comp_sla_materials.insert(&material);
|
||||||
}
|
}
|
||||||
// and mark these SLA materials as installed, therefore this code will not be executed at the next start of the application.
|
// and mark these SLA materials as installed, therefore this code will not be executed at the next start of the application.
|
||||||
|
// NOLINTNEXTLINE(bugprone-nondeterministic-pointer-iteration-order) - each is set by name, so the order does not matter
|
||||||
for (const auto &material: comp_sla_materials)
|
for (const auto &material: comp_sla_materials)
|
||||||
config.set(AppConfig::SECTION_MATERIALS, material->name, "true");
|
config.set(AppConfig::SECTION_MATERIALS, material->name, "true");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3953,10 +3953,8 @@ bool GUI_App::on_init_network(bool try_backup)
|
|||||||
if (!bambu_source) {
|
if (!bambu_source) {
|
||||||
BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << ": can not get bambu source module!";
|
BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << ": can not get bambu source module!";
|
||||||
m_networking_compatible = false;
|
m_networking_compatible = false;
|
||||||
if (should_load_networking_plugin) {
|
|
||||||
m_networking_need_update = true;
|
m_networking_need_update = true;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
if (try_backup) {
|
if (try_backup) {
|
||||||
int result = Slic3r::NetworkAgent::unload_network_module();
|
int result = Slic3r::NetworkAgent::unload_network_module();
|
||||||
@@ -3966,10 +3964,8 @@ bool GUI_App::on_init_network(bool try_backup)
|
|||||||
goto __retry;
|
goto __retry;
|
||||||
}
|
}
|
||||||
BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << ": on_init_network, version dismatch, need upload network module";
|
BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << ": on_init_network, version dismatch, need upload network module";
|
||||||
if (should_load_networking_plugin) {
|
|
||||||
m_networking_need_update = true;
|
m_networking_need_update = true;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << ": on_init_network, load dll failed";
|
BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << ": on_init_network, load dll failed";
|
||||||
// A failed install can leave the config naming a build that never made it to disk;
|
// A failed install can leave the config naming a build that never made it to disk;
|
||||||
@@ -3986,12 +3982,10 @@ bool GUI_App::on_init_network(bool try_backup)
|
|||||||
load_agent_dll = Slic3r::NetworkAgent::initialize_network_module(false, config_version);
|
load_agent_dll = Slic3r::NetworkAgent::initialize_network_module(false, config_version);
|
||||||
goto __retry;
|
goto __retry;
|
||||||
}
|
}
|
||||||
if (should_load_networking_plugin) {
|
|
||||||
BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << ": on_init_network, need upload network module";
|
BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << ": on_init_network, need upload network module";
|
||||||
m_networking_need_update = true;
|
m_networking_need_update = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << boost::format(", create network agent...");
|
BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << boost::format(", create network agent...");
|
||||||
//std::string data_dir = wxStandardPaths::Get().GetUserDataDir().ToUTF8().data();
|
//std::string data_dir = wxStandardPaths::Get().GetUserDataDir().ToUTF8().data();
|
||||||
@@ -8293,7 +8287,7 @@ bool GUI_App::load_language(wxString language, bool initial)
|
|||||||
|
|
||||||
// Release the old locales, create new locales.
|
// Release the old locales, create new locales.
|
||||||
//FIXME wxWidgets cause havoc if the current locale is deleted. We just forget it causing memory leaks for now.
|
//FIXME wxWidgets cause havoc if the current locale is deleted. We just forget it causing memory leaks for now.
|
||||||
m_wxLocale.release();
|
(void) m_wxLocale.release();
|
||||||
m_wxLocale = Slic3r::make_unique<wxLocale>();
|
m_wxLocale = Slic3r::make_unique<wxLocale>();
|
||||||
m_wxLocale->Init(locale_language_info->Language);
|
m_wxLocale->Init(locale_language_info->Language);
|
||||||
// Override language at the active wxTranslations class (which is stored in the active m_wxLocale)
|
// Override language at the active wxTranslations class (which is stored in the active m_wxLocale)
|
||||||
|
|||||||
@@ -165,10 +165,10 @@ TEST_CASE("write_file_atomically survives two threads writing one target", "[uti
|
|||||||
|
|
||||||
std::thread other([&] {
|
std::thread other([&] {
|
||||||
for (int i = 0; i < 50; ++i)
|
for (int i = 0; i < 50; ++i)
|
||||||
write_file_atomically(target.string(), a);
|
(void) write_file_atomically(target.string(), a);
|
||||||
});
|
});
|
||||||
for (int i = 0; i < 50; ++i)
|
for (int i = 0; i < 50; ++i)
|
||||||
write_file_atomically(target.string(), b);
|
(void) write_file_atomically(target.string(), b);
|
||||||
other.join();
|
other.join();
|
||||||
|
|
||||||
std::string content;
|
std::string content;
|
||||||
|
|||||||
Reference in new issue
Block a user