From 515567896158c7492f519105b05ec541b6cb3019 Mon Sep 17 00:00:00 2001 From: Gabe Black Date: Thu, 21 Jan 2021 04:42:05 -0800 Subject: [PATCH] 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 Maintainer: Gabe Black Tested-by: kokoro --- src/proto/protoio.cc | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/proto/protoio.cc b/src/proto/protoio.cc index 691d4ee5c..72e463b8e 100644 --- a/src/proto/protoio.cc +++ b/src/proto/protoio.cc @@ -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(); } -- 2.30.2