[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master 99bff42 3/3: Say why headers are included iff
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master 99bff42 3/3: Say why headers are included iff not obvious |
Date: |
Wed, 23 Nov 2016 19:33:04 +0000 (UTC) |
branch: master
commit 99bff4273265e6fecc27cbf17d7ebae3c4dc4f1c
Author: Gregory W. Chicares <address@hidden>
Commit: Gregory W. Chicares <address@hidden>
Say why headers are included iff not obvious
Also add and remove some #include statements based on file contents.
---
rate_table.cpp | 13 ++++++++-----
rate_table.hpp | 6 +++---
rate_table_test.cpp | 7 ++++++-
rate_table_tool.cpp | 18 +++++++++---------
4 files changed, 26 insertions(+), 18 deletions(-)
diff --git a/rate_table.cpp b/rate_table.cpp
index cb9ee4c..84b21bc 100644
--- a/rate_table.cpp
+++ b/rate_table.cpp
@@ -42,19 +42,22 @@
# pragma clang diagnostic pop
#endif // __clang__
-#include <algorithm>
+#include <algorithm> // std::count()
#include <climits> // ULLONG_MAX
-#include <cmath>
+#include <cmath> // std::pow()
#include <cstdint>
#include <cstdlib> // std::strtoull()
-#include <fstream>
-#include <limits>
+#include <cstring> // std::strncmp()
#include <iomanip>
+#include <ios>
+#include <istream>
+#include <limits>
#include <map>
#include <memory>
+#include <ostream>
#include <sstream>
#include <stdexcept>
-#include <utility> // std::make_pair()
+#include <utility> // std::make_pair(), std::swap()
#include <vector>
using std::uint8_t;
diff --git a/rate_table.hpp b/rate_table.hpp
index 3cc3aa1..400c890 100644
--- a/rate_table.hpp
+++ b/rate_table.hpp
@@ -29,9 +29,9 @@
#include <boost/filesystem/path.hpp>
-#include <memory>
-#include <istream>
-#include <ostream>
+#include <iosfwd>
+#include <memory> // std::shared_ptr
+#include <string>
/// Namespace containing classes working with databases in version 3 of the SOA
/// format.
diff --git a/rate_table_test.cpp b/rate_table_test.cpp
index 384e936..54dd7d4 100644
--- a/rate_table_test.cpp
+++ b/rate_table_test.cpp
@@ -32,7 +32,12 @@
#include <boost/filesystem/fstream.hpp>
#include <boost/filesystem/operations.hpp>
-#include <iomanip>
+#include <fstream>
+#include <iomanip> // std::setw(), std::setfill()
+#include <ios>
+#include <sstream>
+#include <stdexcept>
+#include <streambuf>
using namespace soa_v3_format;
diff --git a/rate_table_tool.cpp b/rate_table_tool.cpp
index 99e7c31..04000ee 100644
--- a/rate_table_tool.cpp
+++ b/rate_table_tool.cpp
@@ -31,19 +31,19 @@
#include <boost/filesystem/convenience.hpp> // extension()
#include <boost/filesystem/operations.hpp> // is_directory(),
directory_iterator
-#include <algorithm>
-#include <cstdio>
-#include <cstdlib>
+#include <algorithm> // std::sort()
+#include <cstdio> // std::fflush()
+#include <cstdlib> // std::atoi()
+#include <exception>
#include <fstream>
-#include <iomanip>
-#include <iostream>
-#include <limits>
+#include <iomanip> // std::setw(), std::setfill()
+#include <iostream> // std::cout, std::cerr
#include <map>
-#include <memory>
-#include <ostream>
-#include <string>
+#include <memory> // std::unique_ptr
+#include <ostream> // std::endl
#include <sstream>
#include <stdexcept>
+#include <string>
#include <vector>
using namespace soa_v3_format;