From 1ddd4f1eaf5ce840ab3c0900add0f5f2508ff16a Mon Sep 17 00:00:00 2001 From: Henning Baldersheim Date: Sat, 19 Nov 2016 23:02:13 +0100 Subject: Avoid including iostream in header files. --- document/src/vespa/document/select/result.cpp | 2 +- document/src/vespa/document/util/bytebuffer.cpp | 3 --- document/src/vespa/document/util/printable.cpp | 1 - memfilepersistence/src/tests/spi/logginglazyfile.h | 2 +- .../src/vespa/memfilepersistence/device/devicemapper.h | 2 +- memfilepersistence/src/vespa/memfilepersistence/tools/dumpslotfile.h | 2 +- memfilepersistence/src/vespa/memfilepersistence/tools/vdsdisktool.h | 2 +- metrics/src/tests/countmetrictest.cpp | 4 ++-- searchlib/src/vespa/searchlib/attribute/address_space.cpp | 2 +- searchlib/src/vespa/searchlib/expression/aggregationrefnode.cpp | 2 -- staging_vespalib/src/vespa/vespalib/util/jsonstream.cpp | 2 -- storage/src/vespa/storage/common/storagelinkqueued.h | 2 +- storage/src/vespa/storage/common/vectorprinter.h | 2 +- .../src/vespa/storage/distributor/latency_statistics_provider.cpp | 5 ++--- storage/src/vespa/storage/distributor/latency_statistics_provider.h | 2 +- .../distributor/maintenance/node_maintenance_stats_tracker.cpp | 2 +- .../storage/distributor/maintenance/node_maintenance_stats_tracker.h | 2 +- storage/src/vespa/storage/distributor/min_replica_provider.h | 1 - vdstestlib/src/vespa/vdstestlib/cppunit/macros.h | 2 +- vespalib/src/vespa/vespalib/objects/nbostream.cpp | 2 -- vespalib/src/vespa/vespalib/objects/nbostream.h | 1 - vespalib/src/vespa/vespalib/util/printable.h | 2 +- 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 #include "result.h" -#include +#include 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 #include #include -#include -#include -#include #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 #include #include -#include 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 -#include +#include 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 +#include #include #include #include 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 -#include +#include 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 -#include +#include 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 +#include 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 #include -#include - #include 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 #include 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 #include -#include +#include #include #include #include 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 -#include +#include 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 #include +#include 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 #include -#include +#include #include 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 - #include +#include 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 -#include +#include #include 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 #include #include 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 +#include #include #include #include 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 #include #include -#include -#include 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 #include -#include #include #include #include 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 -- cgit v1.2.3