Merge branch 'master' into v0.6.0

This commit is contained in:
Thomas Krijnen
2019-05-18 11:01:45 +02:00
+11 -5
View File
@@ -603,12 +603,18 @@ int main(int argc, char** argv) {
// These serializers do not support opening unicode paths. Therefore
// a random temp file is generated using only ASCII characters instead.
std::random_device rng;
std::uniform_int_distribution<int> index_dist(L'A', L'Z');
output_temp_filename = L".ifcopenshell.";
for (int i = 0; i < 8; ++i) {
output_temp_filename.push_back(static_cast<wchar_t>(index_dist(rng)));
std::uniform_int_distribution<int> index_dist('A', 'Z');
{
std::string v = ".ifcopenshell.";
output_temp_filename += path_t(v.begin(), v.end());
}
for (int i = 0; i < 8; ++i) {
output_temp_filename.push_back(static_cast<path_t::value_type>(index_dist(rng)));
}
{
std::string v = ".tmp.";
output_temp_filename += path_t(v.begin(), v.end());
}
output_temp_filename += L".tmp";
}
SerializerSettings settings;