summaryrefslogtreecommitdiff
path: root/src/dxfdim.cc
diff options
context:
space:
mode:
authorMarius Kintel <marius@kintel.net>2012-08-20 23:49:00 (GMT)
committerMarius Kintel <marius@kintel.net>2012-08-20 23:49:00 (GMT)
commit1e56bf65b940f4d71104a358d3fea1e06f0ee461 (patch)
tree1b680054e9708eb66aa83264f7ac8941147b82d5 /src/dxfdim.cc
parentb5cc07098b354bbeec2eae3cf6834e28ad43913e (diff)
parent765f1a98dc124e1913b53ea8467908b8b8bda032 (diff)
Merge commit '765f1a98dc124e1913b53ea8467908b8b8bda032'
Diffstat (limited to 'src/dxfdim.cc')
-rw-r--r--src/dxfdim.cc11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/dxfdim.cc b/src/dxfdim.cc
index 8f68ac6..1ed37fa 100644
--- a/src/dxfdim.cc
+++ b/src/dxfdim.cc
@@ -36,10 +36,9 @@
#include <sstream>
#include <boost/filesystem.hpp>
-using namespace boost::filesystem;
-
boost::unordered_map<std::string,Value> dxf_dim_cache;
boost::unordered_map<std::string,Value> dxf_cross_cache;
+namespace fs = boost::filesystem;
Value builtin_dxf_dim(const Context *ctx, const std::vector<std::string> &argnames, const std::vector<Value> &args)
{
@@ -65,8 +64,8 @@ Value builtin_dxf_dim(const Context *ctx, const std::vector<std::string> &argnam
std::stringstream keystream;
keystream << filename << "|" << layername << "|" << name << "|" << xorigin
- << "|" << yorigin <<"|" << scale << "|" << last_write_time(filename)
- << "|" << file_size(filename);
+ << "|" << yorigin <<"|" << scale << "|" << fs::last_write_time(filename)
+ << "|" << fs::file_size(filename);
std::string key = keystream.str();
if (dxf_dim_cache.find(key) != dxf_dim_cache.end())
return dxf_dim_cache.find(key)->second;
@@ -147,8 +146,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())
contact: Jan Huwald // Impressum