From 702525f69c0c9b7dbeb9f07efd4d9acaf9ead65d Mon Sep 17 00:00:00 2001 From: don bright Date: Sun, 19 Aug 2012 07:31:23 -0500 Subject: cleanup for pull request diff --git a/src/ThrownTogetherRenderer.cc b/src/ThrownTogetherRenderer.cc index b22c6a5..146d2e1 100644 --- a/src/ThrownTogetherRenderer.cc +++ b/src/ThrownTogetherRenderer.cc @@ -30,8 +30,7 @@ #include "system-gl.h" -//#include -#include +#include 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,int> polySetVisitMark; - std::map,int> polySetVisitMark; + boost::unordered_map,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; diff --git a/src/dxfdata.cc b/src/dxfdata.cc index 080e780..0e18dd0 100644 --- a/src/dxfdata.cc +++ b/src/dxfdata.cc @@ -39,7 +39,6 @@ #include #include #include -#include #include #include "value.h" @@ -85,8 +84,7 @@ DxfData::DxfData(double fn, double fs, double fa, Grid2d< std::vector > grid(GRID_COARSE); std::vector lines; // Global lines - //boost::unordered_map< std::string, std::vector > blockdata; // Lines in blocks - std::map< std::string, std::vector > blockdata; // Lines in blocks + boost::unordered_map< std::string, std::vector > 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 EntityList; - typedef std::map EntityList; + typedef boost::unordered_map EntityList; EntityList unsupported_entities_list; // diff --git a/src/dxfdim.cc b/src/dxfdim.cc index 6f1b0ab..872637b 100644 --- a/src/dxfdim.cc +++ b/src/dxfdim.cc @@ -36,11 +36,8 @@ #include #include -//boost::unordered_map dxf_dim_cache; -//boost::unordered_map dxf_cross_cache; -#include -std::map dxf_dim_cache; -std::map dxf_cross_cache; +boost::unordered_map dxf_dim_cache; +boost::unordered_map dxf_cross_cache; namespace fs = boost::filesystem; Value builtin_dxf_dim(const Context *ctx, const std::vector &argnames, const std::vector &args) @@ -186,7 +183,6 @@ Value builtin_dxf_cross(const Context *ctx, const std::vector &argn return dxf_cross_cache[key] = Value(ret); } } - PRINTB("WARNING: Can't find cross in '%s', layer '%s'!", filename % layername); return Value(); } diff --git a/src/dxfdim.h b/src/dxfdim.h index 5dc0ae0..bd42109 100644 --- a/src/dxfdim.h +++ b/src/dxfdim.h @@ -1,13 +1,10 @@ #ifndef DXFDIM_H_ #define DXFDIM_H_ -//#include -#include +#include #include "value.h" -//extern boost::unordered_map dxf_dim_cache; -//extern boost::unordered_map dxf_cross_cache; -extern std::map dxf_dim_cache; -extern std::map dxf_cross_cache; +extern boost::unordered_map dxf_dim_cache; +extern boost::unordered_map dxf_cross_cache; #endif diff --git a/src/dxftess-cgal.cc b/src/dxftess-cgal.cc index d19ef61..fb5bf50 100644 --- a/src/dxftess-cgal.cc +++ b/src/dxftess-cgal.cc @@ -30,8 +30,7 @@ typedef CGAL::Constrained_Delaunay_triangulation_2 CDT; typedef CDT::Vertex_handle Vertex_handle; typedef CDT::Point CDTPoint; -//#include -#include +#include template class DummyCriteria { public: @@ -72,10 +71,8 @@ struct point_info_t typedef std::pair edge_t; void mark_inner_outer(std::vector &tri, Grid2d &point_info, - std::map &edge_to_triangle, - std::map &edge_to_path, int idx, bool inner) -// boost::unordered_map &edge_to_triangle, -// boost::unordered_map &edge_to_path, int idx, bool inner) + boost::unordered_map &edge_to_triangle, + boost::unordered_map &edge_to_path, int idx, bool inner) { if (tri[idx].is_marked) return; diff --git a/src/handle_dep.cc b/src/handle_dep.cc index 0bebb70..2d6f3ff 100644 --- a/src/handle_dep.cc +++ b/src/handle_dep.cc @@ -8,10 +8,8 @@ #include namespace fs = boost::filesystem; #include "boosty.h" -#include -//boost::unordered_set dependencies; -std::set dependencies; +boost::unordered_set dependencies; const char *make_command = NULL; void handle_dep(const std::string &filename) diff --git a/src/surface.cc b/src/surface.cc index eb6561e..2fa3717 100644 --- a/src/surface.cc +++ b/src/surface.cc @@ -42,7 +42,6 @@ #include #include using namespace boost::assign; // bring 'operator+=()' into scope -#include #include 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,double> data; - std::map,double> data; + boost::unordered_map,double> data; double min_val = 0; typedef boost::tokenizer > tokenizer; diff --git a/tests/csgtestcore.cc b/tests/csgtestcore.cc index 0ab9c0a..acc7c31 100644 --- a/tests/csgtestcore.cc +++ b/tests/csgtestcore.cc @@ -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 - 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); -- cgit v0.10.1