Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/supermerill/SuperSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVojtech Kral <vojtech@kral.hk>2019-09-30 17:12:48 +0300
committerVojtech Kral <vojtech@kral.hk>2019-09-30 17:12:48 +0300
commiteb93d2a32d4ae23934f9c1d1d0a046e6338994a6 (patch)
tree36851b3d920d15ba6a82dcfd384ddeba70d8da10 /src/slic3r/Config
parent80c5eaacdf6e044675a7519596c4bcd2d5990ca5 (diff)
parentf5593c05aa7d9c9c9f62b8897063f01dd92c2956 (diff)
Merge branch 'master' into materials
Diffstat (limited to 'src/slic3r/Config')
-rw-r--r--src/slic3r/Config/Snapshot.cpp8
-rw-r--r--src/slic3r/Config/Version.cpp10
2 files changed, 9 insertions, 9 deletions
diff --git a/src/slic3r/Config/Snapshot.cpp b/src/slic3r/Config/Snapshot.cpp
index 521a7c531..7e17542b9 100644
--- a/src/slic3r/Config/Snapshot.cpp
+++ b/src/slic3r/Config/Snapshot.cpp
@@ -342,7 +342,7 @@ static void copy_config_dir_single_level(const boost::filesystem::path &path_src
! boost::filesystem::create_directory(path_dst))
throw std::runtime_error(std::string("Slic3r was unable to create a directory at ") + path_dst.string());
- for (auto &dir_entry : boost::filesystem::directory_iterator(path_src))
+ for (auto &dir_entry : boost::filesystem::directory_iterator(path_src))
if (Slic3r::is_ini_file(dir_entry))
boost::filesystem::copy_file(dir_entry.path(), path_dst / dir_entry.path().filename(), boost::filesystem::copy_option::overwrite_if_exists);
}
@@ -351,7 +351,7 @@ static void delete_existing_ini_files(const boost::filesystem::path &path)
{
if (! boost::filesystem::is_directory(path))
return;
- for (auto &dir_entry : boost::filesystem::directory_iterator(path))
+ for (auto &dir_entry : boost::filesystem::directory_iterator(path))
if (boost::filesystem::is_regular_file(dir_entry.status()) && boost::algorithm::iends_with(dir_entry.path().filename().string(), ".ini"))
boost::filesystem::remove(dir_entry.path());
}
@@ -378,7 +378,7 @@ const Snapshot& SnapshotDB::take_snapshot(const AppConfig &app_config, Snapshot:
sprintf(name, "filament_%u", i);
if (! app_config.has("presets", name))
break;
- snapshot.filaments.emplace_back(app_config.get("presets", name));
+ snapshot.filaments.emplace_back(app_config.get("presets", name));
}
// Vendor specific config bundles and installed printers.
for (const std::pair<std::string, std::map<std::string, std::set<std::string>>> &vendor : app_config.vendors()) {
@@ -417,7 +417,7 @@ const Snapshot& SnapshotDB::take_snapshot(const AppConfig &app_config, Snapshot:
// Backup the presets.
for (const char *subdir : { "print", "filament", "printer", "vendor" })
copy_config_dir_single_level(data_dir / subdir, snapshot_dir / subdir);
- snapshot.save_ini((snapshot_dir / "snapshot.ini").string());
+ snapshot.save_ini((snapshot_dir / "snapshot.ini").string());
assert(m_snapshots.empty() || m_snapshots.back().time_captured <= snapshot.time_captured);
m_snapshots.emplace_back(std::move(snapshot));
return m_snapshots.back();
diff --git a/src/slic3r/Config/Version.cpp b/src/slic3r/Config/Version.cpp
index 175abff69..3f8f960f1 100644
--- a/src/slic3r/Config/Version.cpp
+++ b/src/slic3r/Config/Version.cpp
@@ -227,9 +227,9 @@ size_t Index::load(const boost::filesystem::path &path)
// End of semver or keyword.
break;
}
- if (*key_end != 0 && *key_end != ' ' && *key_end != '\t' && *key_end != '=')
+ if (*key_end != 0 && *key_end != ' ' && *key_end != '\t' && *key_end != '=')
throw file_parser_error("Invalid keyword or semantic version", path, idx_line);
- char *value = left_trim(key_end);
+ char *value = left_trim(key_end);
bool key_value_pair = *value == '=';
if (key_value_pair)
value = left_trim(value + 1);
@@ -245,11 +245,11 @@ size_t Index::load(const boost::filesystem::path &path)
if (strcmp(key, "min_slic3r_version") == 0 || strcmp(key, "max_slic3r_version") == 0) {
if (! svalue.empty())
semver = Semver::parse(svalue);
- if (! semver)
+ if (! semver)
throw file_parser_error(std::string(key) + " must referece a valid semantic version", path, idx_line);
- if (strcmp(key, "min_slic3r_version") == 0)
+ if (strcmp(key, "min_slic3r_version") == 0)
ver.min_slic3r_version = *semver;
- else
+ else
ver.max_slic3r_version = *semver;
} else {
// Ignore unknown keys, as there may come new keys in the future.