misc: Stop "using namespace std" in protoio.cc.

Change-Id: I4f27979910230860c631b63bb500f87b45c24e33
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/39563
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
Maintainer: Gabe Black <gabe.black@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
Gabe Black
2021-01-21 04:42:05 -08:00
parent 2343ee2705
commit 5155678961

View File

@@ -39,11 +39,11 @@
#include "base/logging.hh"
using namespace std;
using namespace google::protobuf;
ProtoOutputStream::ProtoOutputStream(const string& filename) :
fileStream(filename.c_str(), ios::out | ios::binary | ios::trunc),
ProtoOutputStream::ProtoOutputStream(const std::string& filename) :
fileStream(filename.c_str(),
std::ios::out | std::ios::binary | std::ios::trunc),
wrappedFileStream(NULL), gzipStream(NULL), zeroCopyStream(NULL)
{
if (!fileStream.good())
@@ -98,9 +98,9 @@ ProtoOutputStream::write(const Message& msg)
msg.SerializeWithCachedSizes(&codedStream);
}
ProtoInputStream::ProtoInputStream(const string& filename) :
fileStream(filename.c_str(), ios::in | ios::binary), fileName(filename),
useGzip(false),
ProtoInputStream::ProtoInputStream(const std::string& filename) :
fileStream(filename.c_str(), std::ios::in | std::ios::binary),
fileName(filename), useGzip(false),
wrappedFileStream(NULL), gzipStream(NULL), zeroCopyStream(NULL)
{
if (!fileStream.good())
@@ -113,7 +113,7 @@ ProtoInputStream::ProtoInputStream(const string& filename) :
// seek to the start of the input file and clear any flags
fileStream.clear();
fileStream.seekg(0, ifstream::beg);
fileStream.seekg(0, std::ifstream::beg);
createStreams();
}
@@ -172,7 +172,7 @@ ProtoInputStream::reset()
destroyStreams();
// seek to the start of the input file and clear any flags
fileStream.clear();
fileStream.seekg(0, ifstream::beg);
fileStream.seekg(0, std::ifstream::beg);
createStreams();
}