Fixed two major bugs in paxos.cc.
[invirt/third/libt4.git] / log.cc
diff --git a/log.cc b/log.cc
index de00d67..3b881fa 100644 (file)
--- a/log.cc
+++ b/log.cc
@@ -60,14 +60,14 @@ string log::dump() {
 
 void log::restore(string s) {
     LOG("restore: " << s);
-    ofstream f(name, std::ios::trunc);
+    ofstream f(name, ios::trunc);
     f << s;
     f.close();
 }
 
 // XXX should be an atomic operation
 void log::loginstance(unsigned instance, string v) {
-    ofstream f(name, std::ios::app);
+    ofstream f(name, ios::app);
     f << "done " << instance << " " << v << "\n";
     f.close();
 }
@@ -75,7 +75,7 @@ void log::loginstance(unsigned instance, string v) {
 // an acceptor should call logprop(promise) when it
 // receives a prepare to which it responds prepare_ok().
 void log::logprop(prop_t promise) {
-    ofstream f(name, std::ios::app);
+    ofstream f(name, ios::app);
     f << "propseen " << promise.n << " " << promise.m << "\n";
     f.close();
 }
@@ -83,7 +83,7 @@ void log::logprop(prop_t promise) {
 // an acceptor should call logaccept(accepted, accepted_value) when it
 // receives an accept RPC to which it replies accept_ok().
 void log::logaccept(prop_t n, string v) {
-    ofstream f(name, std::ios::app);
+    ofstream f(name, ios::app);
     f << "accepted " << n.n << " " << n.m << " " << v << "\n";
     f.close();
 }