snapshot-interface: cleanup interface header
authorBrian Norris <banorris@uci.edu>
Sat, 26 May 2012 01:10:58 +0000 (18:10 -0700)
committerBrian Norris <banorris@uci.edu>
Sat, 26 May 2012 01:19:44 +0000 (18:19 -0700)
The MyString type does not belong in an interface header. It's only used in one
file, so move its typedef locally.

Remove/move a bunch of misplaced #includes.

There's an unnecessary forward declaration of class snapshotStack.

snapshot-interface.cc
snapshot-interface.h

index 76cb8f4ea2635afc940fec658477840d9933dbc1..b0df836221df41cd309636ae50c6149d3de4ef81 100644 (file)
@@ -5,7 +5,10 @@
 #include <sys/types.h>
 #include <sstream>
 #include <cstring>
+#include <string>
 #include <cassert>
+#include <vector>
+#include <utility>
 
 #define MYBINARYNAME "model"
 #define MYLIBRARYNAME "libmodel.so"
@@ -13,6 +16,8 @@
 #define REPLACEPOS             6
 #define PAGESIZE 4096
 
+typedef std::basic_string<char, std::char_traits<char>, MyAlloc<char> > MyString;
+
 snapshotStack * snapshotObject;
 
 /*This looks like it might leak memory...  Subramanian should fix this. */
index cbebcd58f84a5902fcb784de16f0d439b137513b..0fab53b1ea9fb5ffa0514955bb743f9972acb77e 100644 (file)
@@ -2,16 +2,7 @@
 #define __SNAPINTERFACE_H
 #include "snapshot.h"
 #include "mymemory.h"
-#include <vector>
-#include <utility>
-#include <string>
-#include <map>
-#include <set>
 #include "snapshot.h"
-#include "libthreads.h"
-
-class snapshotStack;
-typedef std::basic_string<char, std::char_traits<char>, MyAlloc<char> > MyString;
 
 void SnapshotGlobalSegments();