aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2017-12-04 17:07:23 -0500
committerJack Lloyd <[email protected]>2017-12-04 17:07:23 -0500
commit26b13bf4662f8ccbf35295f77cb3b3d482c0e1e1 (patch)
tree5c0ca2e8e32bc7890bbc2f0ee137d449a443f587 /src/lib
parentf82ee841f719926e91eb4a5533c964821f08488d (diff)
Remove use of "using namespace std"
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/asn1/asn1_time.cpp18
-rw-r--r--src/lib/utils/calendar.cpp14
2 files changed, 17 insertions, 15 deletions
diff --git a/src/lib/asn1/asn1_time.cpp b/src/lib/asn1/asn1_time.cpp
index daa0c4e7d..aca7fdca0 100644
--- a/src/lib/asn1/asn1_time.cpp
+++ b/src/lib/asn1/asn1_time.cpp
@@ -97,14 +97,16 @@ std::string X509_Time::readable_string() const
// desired format: "%04d/%02d/%02d %02d:%02d:%02d UTC"
std::stringstream output;
- {
- using namespace std;
- output << setfill('0')
- << setw(4) << m_year << "/" << setw(2) << m_month << "/" << setw(2) << m_day
- << " "
- << setw(2) << m_hour << ":" << setw(2) << m_minute << ":" << setw(2) << m_second
- << " UTC";
- }
+ output << std::setfill('0')
+ << std::setw(4) << m_year << "/"
+ << std::setw(2) << m_month << "/"
+ << std::setw(2) << m_day
+ << " "
+ << std::setw(2) << m_hour << ":"
+ << std::setw(2) << m_minute << ":"
+ << std::setw(2) << m_second
+ << " UTC";
+
return output.str();
}
diff --git a/src/lib/utils/calendar.cpp b/src/lib/utils/calendar.cpp
index d39e52823..e902e411d 100644
--- a/src/lib/utils/calendar.cpp
+++ b/src/lib/utils/calendar.cpp
@@ -92,13 +92,13 @@ std::string calendar_point::to_string() const
{
// desired format: <YYYY>-<MM>-<dd>T<HH>:<mm>:<ss>
std::stringstream output;
- {
- using namespace std;
- output << setfill('0')
- << setw(4) << get_year() << "-" << setw(2) << get_month() << "-" << setw(2) << get_day()
- << "T"
- << setw(2) << get_hour() << ":" << setw(2) << get_minutes() << ":" << setw(2) << get_seconds();
- }
+ output << std::setfill('0')
+ << std::setw(4) << get_year() << "-"
+ << std::setw(2) << get_month() << "-"
+ << std::setw(2) << get_day() << "T"
+ << std::setw(2) << get_hour() << ":"
+ << std::setw(2) << get_minutes() << ":"
+ << std::setw(2) << get_seconds();
return output.str();
}