summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/dxfdim.cc9
-rw-r--r--src/handle_dep.cc8
-rw-r--r--src/import.cc2
3 files changed, 8 insertions, 11 deletions
diff --git a/src/dxfdim.cc b/src/dxfdim.cc
index 4af3526..dfe8c13 100644
--- a/src/dxfdim.cc
+++ b/src/dxfdim.cc
@@ -72,7 +72,6 @@ Value builtin_dxf_dim(const Context *ctx, const std::vector<std::string> &argnam
return dxf_dim_cache.find(key)->second;
DxfData dxf(36, 0, 0, filename, layername, xorigin, yorigin, scale);
-/*
for (size_t i = 0; i < dxf.dims.size(); i++)
{
@@ -124,13 +123,12 @@ Value builtin_dxf_dim(const Context *ctx, const std::vector<std::string> &argnam
PRINTB("WARNING: Can't find dimension '%s' in '%s', layer '%s'!",
name % filename % layername);
-*/
return Value();
}
Value builtin_dxf_cross(const Context *ctx, const std::vector<std::string> &argnames, const std::vector<Value> &args)
{
-/* std::string filename;
+ std::string filename;
std::string layername;
double xorigin = 0;
double yorigin = 0;
@@ -149,8 +147,8 @@ Value builtin_dxf_cross(const Context *ctx, const std::vector<std::string> &argn
std::stringstream keystream;
keystream << filename << "|" << layername << "|" << xorigin << "|" << yorigin
- << "|" << scale << "|" << last_write_time(filename)
- << "|" << file_size(filename);
+ << "|" << scale << "|" << fs::last_write_time(filename)
+ << "|" << fs::file_size(filename);
std::string key = keystream.str();
if (dxf_cross_cache.find(key) != dxf_cross_cache.end())
@@ -188,7 +186,6 @@ Value builtin_dxf_cross(const Context *ctx, const std::vector<std::string> &argn
}
PRINTB("WARNING: Can't find cross in '%s', layer '%s'!", filename % layername);
-*/
return Value();
}
diff --git a/src/handle_dep.cc b/src/handle_dep.cc
index cbf7157..2d6f3ff 100644
--- a/src/handle_dep.cc
+++ b/src/handle_dep.cc
@@ -6,7 +6,7 @@
#include <boost/foreach.hpp>
#include <boost/regex.hpp>
#include <boost/filesystem.hpp>
-using namespace boost::filesystem;
+namespace fs = boost::filesystem;
#include "boosty.h"
boost::unordered_set<std::string> dependencies;
@@ -14,14 +14,14 @@ const char *make_command = NULL;
void handle_dep(const std::string &filename)
{
- path filepath(filename);
+ fs::path filepath(filename);
if ( boosty::is_absolute( filepath )) {
dependencies.insert(filename);
}
else {
- dependencies.insert((current_path() / filepath).string());
+ dependencies.insert((fs::current_path() / filepath).string());
}
- if (!exists(filepath) && make_command) {
+ if (!fs::exists(filepath) && make_command) {
std::stringstream buf;
buf << make_command << " '" << boost::regex_replace(filename, boost::regex("'"), "'\\''") << "'";
system(buf.str().c_str()); // FIXME: Handle error
diff --git a/src/import.cc b/src/import.cc
index 2f08b11..1073459 100644
--- a/src/import.cc
+++ b/src/import.cc
@@ -80,7 +80,7 @@ AbstractNode *ImportModule::evaluate(const Context *ctx, const ModuleInstantiati
std::string filename = c.getAbsolutePath(v.isUndefined() ? "" : v.toString());
import_type_e actualtype = this->type;
if (actualtype == TYPE_UNKNOWN) {
- std::string extraw = boosty::extension_str( path(filename) );
+ std::string extraw = boosty::extension_str( fs::path(filename) );
std::string ext = boost::algorithm::to_lower_copy( extraw );
if (ext == ".stl") actualtype = TYPE_STL;
else if (ext == ".off") actualtype = TYPE_OFF;
contact: Jan Huwald // Impressum