about summary refs log tree commit diff
path: root/src/libutil/aterm-map.cc
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2006-09-04T21·06+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2006-09-04T21·06+0000
commit75068e7d753cf6cbe45a4bf294000dca9bd41d8b (patch)
treec6274cc10caab08349b5585206034f41ca4a575f /src/libutil/aterm-map.cc
parentaab88127321344d5818d823bff515d127108d058 (diff)
* Use a proper namespace.
* Optimise header file usage a bit.
* Compile the parser as C++.

Diffstat (limited to 'src/libutil/aterm-map.cc')
-rw-r--r--src/libutil/aterm-map.cc13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/libutil/aterm-map.cc b/src/libutil/aterm-map.cc
index 33388e148a65..6c53e07c4605 100644
--- a/src/libutil/aterm-map.cc
+++ b/src/libutil/aterm-map.cc
@@ -1,9 +1,14 @@
 #include "aterm-map.hh"
 
+#include <iostream>
+
 #include <assert.h>
 #include <stdlib.h>
 
 
+namespace nix {
+
+
 static const unsigned int maxLoadFactor = /* 1 / */ 3;
 static unsigned int nrResizes = 0;
 static unsigned int sizeTotalAlloc = 0;
@@ -214,10 +219,11 @@ unsigned int ATermMap::size()
 }
 
 
-#include <iostream>
-
 void printATermMapStats()
 {
+    using std::cerr;
+    using std::endl;
+    
     cerr << "RESIZES: " << nrResizes << " "
          << sizeTotalAlloc << " "
          << sizeCurAlloc << " "
@@ -319,3 +325,6 @@ int main(int argc, char * * argv)
     printATermMapStats();
 }
 #endif
+
+ 
+}