aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2016-11-19 23:02:13 +0100
committerHenning Baldersheim <balder@yahoo-inc.com>2016-11-19 23:02:13 +0100
commit1ddd4f1eaf5ce840ab3c0900add0f5f2508ff16a (patch)
treee20ac12c30256650644d7c09a0973cd68e07a2d1
parentcfafe24c5bad65eb6a145a7da863e46ee86106f8 (diff)
Avoid including iostream in header files.
-rw-r--r--document/src/vespa/document/select/result.cpp2
-rw-r--r--document/src/vespa/document/util/bytebuffer.cpp3
-rw-r--r--document/src/vespa/document/util/printable.cpp1
-rw-r--r--memfilepersistence/src/tests/spi/logginglazyfile.h2
-rw-r--r--memfilepersistence/src/vespa/memfilepersistence/device/devicemapper.h2
-rw-r--r--memfilepersistence/src/vespa/memfilepersistence/tools/dumpslotfile.h2
-rw-r--r--memfilepersistence/src/vespa/memfilepersistence/tools/vdsdisktool.h2
-rw-r--r--metrics/src/tests/countmetrictest.cpp4
-rw-r--r--searchlib/src/vespa/searchlib/attribute/address_space.cpp2
-rw-r--r--searchlib/src/vespa/searchlib/expression/aggregationrefnode.cpp2
-rw-r--r--staging_vespalib/src/vespa/vespalib/util/jsonstream.cpp2
-rw-r--r--storage/src/vespa/storage/common/storagelinkqueued.h2
-rw-r--r--storage/src/vespa/storage/common/vectorprinter.h2
-rw-r--r--storage/src/vespa/storage/distributor/latency_statistics_provider.cpp5
-rw-r--r--storage/src/vespa/storage/distributor/latency_statistics_provider.h2
-rw-r--r--storage/src/vespa/storage/distributor/maintenance/node_maintenance_stats_tracker.cpp2
-rw-r--r--storage/src/vespa/storage/distributor/maintenance/node_maintenance_stats_tracker.h2
-rw-r--r--storage/src/vespa/storage/distributor/min_replica_provider.h1
-rw-r--r--vdstestlib/src/vespa/vdstestlib/cppunit/macros.h2
-rw-r--r--vespalib/src/vespa/vespalib/objects/nbostream.cpp2
-rw-r--r--vespalib/src/vespa/vespalib/objects/nbostream.h1
-rw-r--r--vespalib/src/vespa/vespalib/util/printable.h2
22 files changed, 17 insertions, 30 deletions
diff --git a/document/src/vespa/document/select/result.cpp b/document/src/vespa/document/select/result.cpp
index a4947665654..ebdecc4dd03 100644
--- a/document/src/vespa/document/select/result.cpp
+++ b/document/src/vespa/document/select/result.cpp
@@ -1,7 +1,7 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include <vespa/fastos/fastos.h>
#include "result.h"
-#include <iostream>
+#include <ostream>
namespace document {
namespace select {
diff --git a/document/src/vespa/document/util/bytebuffer.cpp b/document/src/vespa/document/util/bytebuffer.cpp
index f6a0bfda3c9..1b0d9562bfd 100644
--- a/document/src/vespa/document/util/bytebuffer.cpp
+++ b/document/src/vespa/document/util/bytebuffer.cpp
@@ -9,9 +9,6 @@
#include <vespa/document/util/bytebuffer.h>
#include <vespa/vespalib/stllike/asciistream.h>
#include <sstream>
-#include <stdio.h>
-#include <string.h>
-#include <iostream>
#define LOG_DEBUG1(a)
// Enable this macros instead to see what bytebuffer calls come
diff --git a/document/src/vespa/document/util/printable.cpp b/document/src/vespa/document/util/printable.cpp
index 0adf9833e48..53560d666f9 100644
--- a/document/src/vespa/document/util/printable.cpp
+++ b/document/src/vespa/document/util/printable.cpp
@@ -2,7 +2,6 @@
#include <vespa/fastos/fastos.h>
#include <vespa/document/util/printable.h>
#include <sstream>
-#include <iostream>
namespace document {
diff --git a/memfilepersistence/src/tests/spi/logginglazyfile.h b/memfilepersistence/src/tests/spi/logginglazyfile.h
index e54753f7c3e..6379a8d9597 100644
--- a/memfilepersistence/src/tests/spi/logginglazyfile.h
+++ b/memfilepersistence/src/tests/spi/logginglazyfile.h
@@ -2,7 +2,7 @@
#pragma once
#include <vespa/vespalib/io/fileutil.h>
-#include <iostream>
+#include <sstream>
namespace storage {
diff --git a/memfilepersistence/src/vespa/memfilepersistence/device/devicemapper.h b/memfilepersistence/src/vespa/memfilepersistence/device/devicemapper.h
index dd25283d029..739fa903a00 100644
--- a/memfilepersistence/src/vespa/memfilepersistence/device/devicemapper.h
+++ b/memfilepersistence/src/vespa/memfilepersistence/device/devicemapper.h
@@ -5,7 +5,7 @@
*/
#pragma once
-#include <iostream>
+#include <iosfwd>
#include <map>
#include <string>
#include <memory>
diff --git a/memfilepersistence/src/vespa/memfilepersistence/tools/dumpslotfile.h b/memfilepersistence/src/vespa/memfilepersistence/tools/dumpslotfile.h
index 698f3a5066b..07c9521af5b 100644
--- a/memfilepersistence/src/vespa/memfilepersistence/tools/dumpslotfile.h
+++ b/memfilepersistence/src/vespa/memfilepersistence/tools/dumpslotfile.h
@@ -3,7 +3,7 @@
#pragma once
#include <vespa/fastos/fastos.h>
-#include <iostream>
+#include <iosfwd>
namespace config {
class ConfigUri;
diff --git a/memfilepersistence/src/vespa/memfilepersistence/tools/vdsdisktool.h b/memfilepersistence/src/vespa/memfilepersistence/tools/vdsdisktool.h
index f764db274ce..c4f79a85126 100644
--- a/memfilepersistence/src/vespa/memfilepersistence/tools/vdsdisktool.h
+++ b/memfilepersistence/src/vespa/memfilepersistence/tools/vdsdisktool.h
@@ -3,7 +3,7 @@
#pragma once
#include <vespa/fastos/fastos.h>
-#include <iostream>
+#include <iosfwd>
namespace storage {
namespace memfile {
diff --git a/metrics/src/tests/countmetrictest.cpp b/metrics/src/tests/countmetrictest.cpp
index 1f39113474b..9c99e6c686b 100644
--- a/metrics/src/tests/countmetrictest.cpp
+++ b/metrics/src/tests/countmetrictest.cpp
@@ -43,12 +43,12 @@ void CountMetricTest::testLongCountMetric()
o = m2 - n;
CPPUNIT_ASSERT_EQUAL(uint64_t(84), o.getValue());
- std::string expected(
- "test count=84");
+ std::string expected("test count=84");
CPPUNIT_ASSERT_EQUAL(expected, o.toString());
CPPUNIT_ASSERT_EQUAL(Double(84), Double(o.getDoubleValue("value")));
CPPUNIT_ASSERT_EQUAL(int64_t(84), o.getLongValue("value"));
+ (void) expected;
}
}
diff --git a/searchlib/src/vespa/searchlib/attribute/address_space.cpp b/searchlib/src/vespa/searchlib/attribute/address_space.cpp
index c953be81020..ba9bc190fda 100644
--- a/searchlib/src/vespa/searchlib/attribute/address_space.cpp
+++ b/searchlib/src/vespa/searchlib/attribute/address_space.cpp
@@ -1,7 +1,7 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include "address_space.h"
-#include <iostream>
+#include <ostream>
namespace search {
diff --git a/searchlib/src/vespa/searchlib/expression/aggregationrefnode.cpp b/searchlib/src/vespa/searchlib/expression/aggregationrefnode.cpp
index 52774fa7234..64c071af0f9 100644
--- a/searchlib/src/vespa/searchlib/expression/aggregationrefnode.cpp
+++ b/searchlib/src/vespa/searchlib/expression/aggregationrefnode.cpp
@@ -1,8 +1,6 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include <vespa/fastos/fastos.h>
#include <vespa/searchlib/expression/aggregationrefnode.h>
-#include <iostream>
-
#include <stdexcept>
namespace search {
diff --git a/staging_vespalib/src/vespa/vespalib/util/jsonstream.cpp b/staging_vespalib/src/vespa/vespalib/util/jsonstream.cpp
index c7cf02b1313..da8e550a825 100644
--- a/staging_vespalib/src/vespa/vespalib/util/jsonstream.cpp
+++ b/staging_vespalib/src/vespa/vespalib/util/jsonstream.cpp
@@ -1,8 +1,6 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include "jsonstream.h"
-
-#include <iostream>
#include <vespa/vespalib/util/exceptions.h>
namespace vespalib {
diff --git a/storage/src/vespa/storage/common/storagelinkqueued.h b/storage/src/vespa/storage/common/storagelinkqueued.h
index cec29d1b3b5..982cf66e3cb 100644
--- a/storage/src/vespa/storage/common/storagelinkqueued.h
+++ b/storage/src/vespa/storage/common/storagelinkqueued.h
@@ -16,7 +16,7 @@
#include <vespa/vespalib/util/document_runnable.h>
#include <deque>
-#include <iostream>
+#include <sstream>
#include <memory>
#include <list>
#include <limits>
diff --git a/storage/src/vespa/storage/common/vectorprinter.h b/storage/src/vespa/storage/common/vectorprinter.h
index 46e71a14d09..3120ed198ea 100644
--- a/storage/src/vespa/storage/common/vectorprinter.h
+++ b/storage/src/vespa/storage/common/vectorprinter.h
@@ -2,7 +2,7 @@
#pragma once
#include <vector>
-#include <iostream>
+#include <ostream>
namespace storage {
diff --git a/storage/src/vespa/storage/distributor/latency_statistics_provider.cpp b/storage/src/vespa/storage/distributor/latency_statistics_provider.cpp
index ef0807da030..7207c4745fc 100644
--- a/storage/src/vespa/storage/distributor/latency_statistics_provider.cpp
+++ b/storage/src/vespa/storage/distributor/latency_statistics_provider.cpp
@@ -1,6 +1,7 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include <vespa/fastos/fastos.h>
#include <vespa/storage/distributor/latency_statistics_provider.h>
+#include <ostream>
namespace storage {
namespace distributor {
@@ -18,9 +19,7 @@ operator<<(std::ostream& os, const OperationStats& op)
std::ostream&
operator<<(std::ostream& os, const NodeStats& stats)
{
- os << "NodeStats("
- << "puts=" << stats.puts
- << ')';
+ os << "NodeStats(puts=" << stats.puts << ')';
return os;
}
diff --git a/storage/src/vespa/storage/distributor/latency_statistics_provider.h b/storage/src/vespa/storage/distributor/latency_statistics_provider.h
index 32f217e5ce3..ecc0e16bdb1 100644
--- a/storage/src/vespa/storage/distributor/latency_statistics_provider.h
+++ b/storage/src/vespa/storage/distributor/latency_statistics_provider.h
@@ -3,7 +3,7 @@
#include <chrono>
#include <unordered_map>
-#include <iostream>
+#include <iosfwd>
#include <stdint.h>
namespace storage {
diff --git a/storage/src/vespa/storage/distributor/maintenance/node_maintenance_stats_tracker.cpp b/storage/src/vespa/storage/distributor/maintenance/node_maintenance_stats_tracker.cpp
index 5cef9767714..e10151b9ba5 100644
--- a/storage/src/vespa/storage/distributor/maintenance/node_maintenance_stats_tracker.cpp
+++ b/storage/src/vespa/storage/distributor/maintenance/node_maintenance_stats_tracker.cpp
@@ -1,7 +1,7 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include <vespa/fastos/fastos.h>
-
#include <vespa/storage/distributor/maintenance/node_maintenance_stats_tracker.h>
+#include <ostream>
namespace storage {
namespace distributor {
diff --git a/storage/src/vespa/storage/distributor/maintenance/node_maintenance_stats_tracker.h b/storage/src/vespa/storage/distributor/maintenance/node_maintenance_stats_tracker.h
index 5e1177a5ca6..477118ae821 100644
--- a/storage/src/vespa/storage/distributor/maintenance/node_maintenance_stats_tracker.h
+++ b/storage/src/vespa/storage/distributor/maintenance/node_maintenance_stats_tracker.h
@@ -2,7 +2,7 @@
#pragma once
#include <unordered_map>
-#include <iostream>
+#include <iosfwd>
#include <stdint.h>
namespace storage {
diff --git a/storage/src/vespa/storage/distributor/min_replica_provider.h b/storage/src/vespa/storage/distributor/min_replica_provider.h
index 64adea622ed..be6f874a98c 100644
--- a/storage/src/vespa/storage/distributor/min_replica_provider.h
+++ b/storage/src/vespa/storage/distributor/min_replica_provider.h
@@ -1,7 +1,6 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once
-#include <iostream>
#include <stdint.h>
#include <unordered_map>
diff --git a/vdstestlib/src/vespa/vdstestlib/cppunit/macros.h b/vdstestlib/src/vespa/vdstestlib/cppunit/macros.h
index 0665ec2e3df..4239f7b0b9e 100644
--- a/vdstestlib/src/vespa/vdstestlib/cppunit/macros.h
+++ b/vdstestlib/src/vespa/vdstestlib/cppunit/macros.h
@@ -139,7 +139,7 @@
} \
}
-#include <iostream>
+#include <ostream>
#include <map>
#include <unordered_map>
#include <vector>
diff --git a/vespalib/src/vespa/vespalib/objects/nbostream.cpp b/vespalib/src/vespa/vespalib/objects/nbostream.cpp
index ab6abecc373..ec75ca28ca0 100644
--- a/vespalib/src/vespa/vespalib/objects/nbostream.cpp
+++ b/vespalib/src/vespa/vespalib/objects/nbostream.cpp
@@ -4,8 +4,6 @@
#include <vespa/vespalib/util/stringfmt.h>
#include <vespa/vespalib/objects/nbostream.h>
#include <vespa/vespalib/util/optimized.h>
-#include <stdexcept>
-#include <iostream>
namespace vespalib {
diff --git a/vespalib/src/vespa/vespalib/objects/nbostream.h b/vespalib/src/vespa/vespalib/objects/nbostream.h
index cb15db018fc..323df72cd89 100644
--- a/vespalib/src/vespa/vespalib/objects/nbostream.h
+++ b/vespalib/src/vespa/vespalib/objects/nbostream.h
@@ -3,7 +3,6 @@
#include <vespa/fastos/fastos.h>
#include <vector>
-#include <string>
#include <vespa/vespalib/stllike/string.h>
#include <vespa/vespalib/stllike/asciistream.h>
#include <vespa/vespalib/util/array.h>
diff --git a/vespalib/src/vespa/vespalib/util/printable.h b/vespalib/src/vespa/vespalib/util/printable.h
index 5018813d4a5..341402015e4 100644
--- a/vespalib/src/vespa/vespalib/util/printable.h
+++ b/vespalib/src/vespa/vespalib/util/printable.h
@@ -20,7 +20,7 @@
*
* Sadly, std::string may have performance issues in some contexts, as it does
* some synchronization to allow sharing content, and requires heap allocation.
- * std::iostream also have issues causing it to require some synchronization.
+ * std::ostream also have issues causing it to require some synchronization.
*
* The AsciiPrintable class implements similar functionality as Printable,
* using the vespalib classes on top of the STL functionality. Using this class