Permalink
Browse files

cleanup for pull request

  • Loading branch information...
1 parent ca03eec commit 702525f69c0c9b7dbeb9f07efd4d9acaf9ead65d @donbright donbright committed Aug 19, 2012
Showing with 14 additions and 40 deletions.
  1. +2 −4 src/ThrownTogetherRenderer.cc
  2. +2 −5 src/dxfdata.cc
  3. +2 −6 src/dxfdim.cc
  4. +3 −6 src/dxfdim.h
  5. +3 −6 src/dxftess-cgal.cc
  6. +1 −3 src/handle_dep.cc
  7. +1 −3 src/surface.cc
  8. +0 −7 tests/csgtestcore.cc
@@ -30,8 +30,7 @@
#include "system-gl.h"
-//#include <boost/unordered_map.hpp>
-#include <map>
+#include <boost/unordered_map.hpp>
ThrownTogetherRenderer::ThrownTogetherRenderer(CSGChain *root_chain,
CSGChain *highlights_chain,
@@ -63,8 +62,7 @@ void ThrownTogetherRenderer::renderCSGChain(CSGChain *chain, bool highlight,
bool fberror) const
{
glDepthFunc(GL_LEQUAL);
- //boost::unordered_map<std::pair<PolySet*,Transform3d*>,int> polySetVisitMark;
- std::map<std::pair<PolySet*,Transform3d*>,int> polySetVisitMark;
+ boost::unordered_map<std::pair<PolySet*,Transform3d*>,int> polySetVisitMark;
for (size_t i = 0; i < chain->polysets.size(); i++) {
if (polySetVisitMark[std::make_pair(chain->polysets[i].get(), &chain->matrices[i])]++ > 0)
continue;
View
@@ -39,7 +39,6 @@
#include <boost/algorithm/string.hpp>
#include <algorithm>
#include <sstream>
-#include <map>
#include <QDir>
#include "value.h"
@@ -85,8 +84,7 @@ DxfData::DxfData(double fn, double fs, double fa,
Grid2d< std::vector<int> > grid(GRID_COARSE);
std::vector<Line> lines; // Global lines
- //boost::unordered_map< std::string, std::vector<Line> > blockdata; // Lines in blocks
- std::map< std::string, std::vector<Line> > blockdata; // Lines in blocks
+ boost::unordered_map< std::string, std::vector<Line> > blockdata; // Lines in blocks
bool in_entities_section = false;
bool in_blocks_section = false;
@@ -124,8 +122,7 @@ DxfData::DxfData(double fn, double fs, double fa,
for (int j = 0; j < 2; j++)
coords[i][j] = 0;
- //typedef boost::unordered_map<std::string, int> EntityList;
- typedef std::map<std::string, int> EntityList;
+ typedef boost::unordered_map<std::string, int> EntityList;
EntityList unsupported_entities_list;
//
View
@@ -36,11 +36,8 @@
#include <sstream>
#include <boost/filesystem.hpp>
-//boost::unordered_map<std::string,Value> dxf_dim_cache;
-//boost::unordered_map<std::string,Value> dxf_cross_cache;
-#include <map>
-std::map<std::string,Value> dxf_dim_cache;
-std::map<std::string,Value> dxf_cross_cache;
+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)
@@ -186,7 +183,6 @@ Value builtin_dxf_cross(const Context *ctx, const std::vector<std::string> &argn
return dxf_cross_cache[key] = Value(ret);
}
}
-
PRINTB("WARNING: Can't find cross in '%s', layer '%s'!", filename % layername);
return Value();
}
View
@@ -1,13 +1,10 @@
#ifndef DXFDIM_H_
#define DXFDIM_H_
-//#include <boost/unordered_map.hpp>
-#include <map>
+#include <boost/unordered_map.hpp>
#include "value.h"
-//extern boost::unordered_map<std::string,Value> dxf_dim_cache;
-//extern boost::unordered_map<std::string,Value> dxf_cross_cache;
-extern std::map<std::string,Value> dxf_dim_cache;
-extern std::map<std::string,Value> dxf_cross_cache;
+extern boost::unordered_map<std::string,Value> dxf_dim_cache;
+extern boost::unordered_map<std::string,Value> dxf_cross_cache;
#endif
View
@@ -30,8 +30,7 @@ typedef CGAL::Constrained_Delaunay_triangulation_2<K, Tds> CDT;
typedef CDT::Vertex_handle Vertex_handle;
typedef CDT::Point CDTPoint;
-//#include <boost/unordered_map.hpp>
-#include <map>
+#include <boost/unordered_map.hpp>
template <class T> class DummyCriteria {
public:
@@ -72,10 +71,8 @@ struct point_info_t
typedef std::pair<point_info_t*,point_info_t*> edge_t;
void mark_inner_outer(std::vector<struct triangle> &tri, Grid2d<point_info_t> &point_info,
- std::map<edge_t,int> &edge_to_triangle,
- std::map<edge_t,int> &edge_to_path, int idx, bool inner)
-// boost::unordered_map<edge_t,int> &edge_to_triangle,
-// boost::unordered_map<edge_t,int> &edge_to_path, int idx, bool inner)
+ boost::unordered_map<edge_t,int> &edge_to_triangle,
+ boost::unordered_map<edge_t,int> &edge_to_path, int idx, bool inner)
{
if (tri[idx].is_marked)
return;
View
@@ -8,10 +8,8 @@
#include <boost/filesystem.hpp>
namespace fs = boost::filesystem;
#include "boosty.h"
-#include <set>
-//boost::unordered_set<std::string> dependencies;
-std::set<std::string> dependencies;
+boost::unordered_set<std::string> dependencies;
const char *make_command = NULL;
void handle_dep(const std::string &filename)
View
@@ -42,7 +42,6 @@
#include <boost/algorithm/string.hpp>
#include <boost/assign/std/vector.hpp>
using namespace boost::assign; // bring 'operator+=()' into scope
-#include <map>
#include <boost/filesystem.hpp>
namespace fs = boost::filesystem;
@@ -111,8 +110,7 @@ PolySet *SurfaceNode::evaluate_polyset(class PolySetEvaluator *) const
PolySet *p = new PolySet();
int lines = 0, columns = 0;
- //boost::unordered_map<std::pair<int,int>,double> data;
- std::map<std::pair<int,int>,double> data;
+ boost::unordered_map<std::pair<int,int>,double> data;
double min_val = 0;
typedef boost::tokenizer<boost::char_separator<char> > tokenizer;
View
@@ -357,13 +357,6 @@ int csgtestcore(int argc, char *argv[], test_type_e test_type)
Vector3d camerapos = center - radius*1.8*cameradir;
csgInfo.glview->setCamera(camerapos, center);
-#include <iostream>
- if (csgInfo.background_chain)
- std::cout << csgInfo.background_chain->dump( true ) << "\n";
- if (csgInfo.root_chain)
- std::cout << csgInfo.root_chain->dump( true ) << "\n";
- if (csgInfo.highlights_chain)
- std::cout << csgInfo.highlights_chain->dump( true ) << "\n";
OpenCSGRenderer opencsgRenderer(csgInfo.root_chain, csgInfo.highlights_chain, csgInfo.background_chain, csgInfo.glview->shaderinfo);
ThrownTogetherRenderer thrownTogetherRenderer(csgInfo.root_chain, csgInfo.highlights_chain, csgInfo.background_chain);

0 comments on commit 702525f

Please sign in to comment.