aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2017-02-06 00:57:55 +0100
committerHenning Baldersheim <balder@yahoo-inc.com>2017-02-06 17:57:25 +0100
commit1b9151ab93467dd5508cc9c63b674310df0ab0b3 (patch)
tree11e62fae250894b6e61d580bf95eaf7014fc5fce
parent65dcaa714247b95459495338f044e89446d9a986 (diff)
Optimize includes.
-rw-r--r--config/src/apps/configproxy-cmd/main.cpp5
-rw-r--r--config/src/apps/configproxy-cmd/methods.cpp2
-rw-r--r--config/src/apps/configproxy-cmd/proxycmd.cpp6
-rw-r--r--config/src/apps/getvespaconfig/getconfig.cpp11
-rw-r--r--config/src/apps/pingproxy/pingproxy.cpp9
-rw-r--r--configd/src/apps/sentinel/metrics.cpp5
-rw-r--r--configd/src/apps/sentinel/state-api.cpp1
-rw-r--r--configutil/src/apps/configstatus/main.cpp8
-rw-r--r--configutil/src/apps/modelinspect/main.cpp7
-rw-r--r--configutil/src/lib/configstatus.cpp13
-rw-r--r--configutil/src/lib/tags.cpp5
-rw-r--r--fastos/src/vespa/fastos/app.h4
-rw-r--r--fnet/src/vespa/fnet/connect_thread.cpp2
-rw-r--r--frtstream/src/example/simple.cpp8
-rw-r--r--frtstream/src/vespa/frtstream/frtclientstream.cpp4
-rw-r--r--frtstream/src/vespa/frtstream/frtstream.cpp6
-rw-r--r--logd/src/logd/watch.cpp18
-rw-r--r--persistence/src/vespa/persistence/proxy/buildid.cpp3
-rw-r--r--persistence/src/vespa/persistence/proxy/providerproxy.cpp1
-rw-r--r--persistence/src/vespa/persistence/proxy/providerstub.cpp6
-rw-r--r--persistence/src/vespa/persistence/spi/abstractpersistenceprovider.cpp2
-rw-r--r--persistence/src/vespa/persistence/spi/partitionstate.cpp3
-rw-r--r--persistence/src/vespa/persistence/spi/persistenceprovider.cpp7
-rw-r--r--persistencetypes/src/persistence/spi/types.cpp8
-rw-r--r--searchcommon/src/vespa/searchcommon/common/schemaconfigurer.cpp5
-rw-r--r--searchcore/src/vespa/searchcore/fdispatch/common/stdincl.h4
-rw-r--r--searchcore/src/vespa/searchcore/fdispatch/search/configdesc.cpp7
-rw-r--r--searchcore/src/vespa/searchcore/fdispatch/search/configdesc.h6
-rw-r--r--searchsummary/src/vespa/searchsummary/docsummary/attributedfw.cpp6
-rw-r--r--searchsummary/src/vespa/searchsummary/docsummary/docsumconfig.cpp20
-rw-r--r--searchsummary/src/vespa/searchsummary/docsummary/docsumfieldwriter.cpp19
-rw-r--r--searchsummary/src/vespa/searchsummary/docsummary/docsumformat.cpp11
-rw-r--r--searchsummary/src/vespa/searchsummary/docsummary/docsumstate.cpp3
-rw-r--r--searchsummary/src/vespa/searchsummary/docsummary/docsumwriter.cpp4
-rw-r--r--searchsummary/src/vespa/searchsummary/docsummary/dynamicteaserdfw.cpp20
-rw-r--r--searchsummary/src/vespa/searchsummary/docsummary/juniperproperties.cpp49
-rw-r--r--searchsummary/src/vespa/searchsummary/docsummary/keywordextractor.cpp7
-rw-r--r--searchsummary/src/vespa/searchsummary/docsummary/rankfeaturesdfw.cpp6
-rw-r--r--searchsummary/src/vespa/searchsummary/docsummary/resultclass.cpp2
-rw-r--r--searchsummary/src/vespa/searchsummary/docsummary/resultpacker.cpp6
-rw-r--r--searchsummary/src/vespa/searchsummary/docsummary/summaryfeaturesdfw.cpp4
-rw-r--r--searchsummary/src/vespa/searchsummary/docsummary/textextractordfw.cpp2
-rw-r--r--searchsummary/src/vespa/searchsummary/docsummary/tokenizer.cpp6
-rw-r--r--searchsummary/src/vespa/searchsummary/docsummary/urlresult.cpp22
-rw-r--r--storageserver/src/apps/storaged/forcelink.cpp1
-rw-r--r--storageserver/src/vespa/storageserver/app/dummyservicelayerprocess.cpp7
-rw-r--r--storageserver/src/vespa/storageserver/app/memfileservicelayerprocess.cpp4
-rw-r--r--storageserver/src/vespa/storageserver/app/servicelayerprocess.cpp11
-rw-r--r--vdslib/src/vespa/vdslib/bucketdistribution.cpp5
-rw-r--r--vdslib/src/vespa/vdslib/container/documentsummary.cpp2
-rw-r--r--vdslib/src/vespa/vdslib/container/searchresult.cpp2
-rw-r--r--vdslib/src/vespa/vdslib/container/visitorordering.cpp2
-rw-r--r--vdslib/src/vespa/vdslib/container/visitorstatistics.cpp6
-rw-r--r--vdslib/src/vespa/vdslib/state/idealgroup.cpp3
-rw-r--r--vdslib/src/vespa/vdslib/state/state.cpp1
-rw-r--r--vdslib/src/vespa/vdslib/thread/taskscheduler.cpp4
-rw-r--r--vespaclient/src/vespa/vespaclient/spoolmaster/application.cpp3
-rw-r--r--vespaclient/src/vespa/vespaclient/spoolmaster/application.h1
-rw-r--r--vespaclient/src/vespa/vespaclient/spoolmaster/main.cpp2
-rw-r--r--vespaclient/src/vespa/vespaclient/vespadoclocator/main.cpp2
-rw-r--r--vespaclient/src/vespa/vespaclient/vesparoute/main.cpp4
-rw-r--r--vespaclient/src/vespa/vespaclient/vesparoute/mynetwork.cpp5
-rw-r--r--vespaclient/src/vespa/vespaclient/vesparoute/params.cpp2
-rw-r--r--vespalog/src/vespa/log/log-assert.cpp6
-rw-r--r--vespalog/src/vespa/log/log.cpp19
65 files changed, 158 insertions, 287 deletions
diff --git a/config/src/apps/configproxy-cmd/main.cpp b/config/src/apps/configproxy-cmd/main.cpp
index 34f2eeab143..b9090d3b641 100644
--- a/config/src/apps/configproxy-cmd/main.cpp
+++ b/config/src/apps/configproxy-cmd/main.cpp
@@ -1,11 +1,10 @@
// 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 <iostream>
-#include <vespa/vespalib/stllike/string.h>
#include "flags.h"
#include "proxycmd.h"
#include "methods.h"
+#include <vespa/fastos/app.h>
+#include <iostream>
class Application : public FastOS_Application
{
diff --git a/config/src/apps/configproxy-cmd/methods.cpp b/config/src/apps/configproxy-cmd/methods.cpp
index 8345316c6a4..086ec107553 100644
--- a/config/src/apps/configproxy-cmd/methods.cpp
+++ b/config/src/apps/configproxy-cmd/methods.cpp
@@ -1,5 +1,5 @@
// 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 "methods.h"
#include <iostream>
diff --git a/config/src/apps/configproxy-cmd/proxycmd.cpp b/config/src/apps/configproxy-cmd/proxycmd.cpp
index 34bd354c79f..48c343367f7 100644
--- a/config/src/apps/configproxy-cmd/proxycmd.cpp
+++ b/config/src/apps/configproxy-cmd/proxycmd.cpp
@@ -1,8 +1,8 @@
// 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 "proxycmd.h"
#include <iostream>
-#include <vespa/vespalib/util/vstringfmt.h>
+#include <vespa/vespalib/util/stringfmt.h>
ProxyCmd::ProxyCmd(const Flags& flags)
: _supervisor(NULL),
@@ -46,7 +46,7 @@ void ProxyCmd::printArray(FRT_Values *rvals) {
}
vespalib::string ProxyCmd::makeSpec() {
- return vespalib::make_vespa_string("tcp/%s:%d", _flags.hostname.c_str(), _flags.portnumber);
+ return vespalib::make_string("tcp/%s:%d", _flags.hostname.c_str(), _flags.portnumber);
}
void ProxyCmd::autoPrint() {
diff --git a/config/src/apps/getvespaconfig/getconfig.cpp b/config/src/apps/getvespaconfig/getconfig.cpp
index 95e804381d0..820e0f7178e 100644
--- a/config/src/apps/getvespaconfig/getconfig.cpp
+++ b/config/src/apps/getvespaconfig/getconfig.cpp
@@ -1,21 +1,20 @@
// 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/log/log.h>
-LOG_SETUP("getconfig");
#include <vespa/fnet/frt/frt.h>
#include <vespa/config/config.h>
-#include <vespa/config/frt/protocol.h>
#include <vespa/config/frt/frtconfigrequestfactory.h>
#include <vespa/config/frt/frtconnection.h>
#include <vespa/config/common/payload_converter.h>
-#include <vespa/config/common/vespa_version.h>
+#include <vespa/fastos/app.h>
+
#include <string>
#include <sstream>
#include <fstream>
+#include <vespa/log/log.h>
+LOG_SETUP("getconfig");
+
using namespace config;
class GetConfig : public FastOS_Application
diff --git a/config/src/apps/pingproxy/pingproxy.cpp b/config/src/apps/pingproxy/pingproxy.cpp
index 444d024e240..db790820e64 100644
--- a/config/src/apps/pingproxy/pingproxy.cpp
+++ b/config/src/apps/pingproxy/pingproxy.cpp
@@ -1,14 +1,13 @@
// 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/log/log.h>
-LOG_SETUP("pingproxy");
#include <vespa/fnet/frt/frt.h>
+#include <vespa/fastos/app.h>
-#include <string>
#include <sstream>
+#include <vespa/log/log.h>
+LOG_SETUP("pingproxy");
+
class PingProxy : public FastOS_Application
{
diff --git a/configd/src/apps/sentinel/metrics.cpp b/configd/src/apps/sentinel/metrics.cpp
index 14527221643..3a7d2ddb883 100644
--- a/configd/src/apps/sentinel/metrics.cpp
+++ b/configd/src/apps/sentinel/metrics.cpp
@@ -1,9 +1,8 @@
// 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/log/log.h>
-LOG_SETUP(".metrics");
#include "metrics.h"
+#include <vespa/log/log.h>
+LOG_SETUP(".metrics");
namespace config {
namespace sentinel {
diff --git a/configd/src/apps/sentinel/state-api.cpp b/configd/src/apps/sentinel/state-api.cpp
index 0f1a901ec6b..81efdfda050 100644
--- a/configd/src/apps/sentinel/state-api.cpp
+++ b/configd/src/apps/sentinel/state-api.cpp
@@ -1,6 +1,5 @@
// 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 "state-api.h"
#include <vespa/vespalib/util/host_name.h>
#include <vespa/vespalib/util/stringfmt.h>
diff --git a/configutil/src/apps/configstatus/main.cpp b/configutil/src/apps/configstatus/main.cpp
index e17ee658cc2..db411d309d1 100644
--- a/configutil/src/apps/configstatus/main.cpp
+++ b/configutil/src/apps/configstatus/main.cpp
@@ -1,13 +1,13 @@
// 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/defaults.h>
-#include <vespa/log/log.h>
#include <vespa/vespalib/text/stringtokenizer.h>
-LOG_SETUP("vespa-config-status");
#include <iostream>
#include <lib/configstatus.h>
-#include <lib/hostfilter.h>
+#include <vespa/fastos/app.h>
+
+#include <vespa/log/log.h>
+LOG_SETUP("vespa-config-status");
class Application : public FastOS_Application {
ConfigStatus::Flags _flags;
diff --git a/configutil/src/apps/modelinspect/main.cpp b/configutil/src/apps/modelinspect/main.cpp
index 592bc8bdf8b..ca660791223 100644
--- a/configutil/src/apps/modelinspect/main.cpp
+++ b/configutil/src/apps/modelinspect/main.cpp
@@ -1,13 +1,14 @@
// 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/defaults.h>
-#include <vespa/log/log.h>
-LOG_SETUP("vespa-model-inspect");
#include <iostream>
#include <lib/modelinspect.h>
#include <vespa/vespalib/text/stringtokenizer.h>
#include <vespa/vespalib/stllike/asciistream.h>
+#include <vespa/fastos/app.h>
+
+#include <vespa/log/log.h>
+LOG_SETUP("vespa-model-inspect");
class Application : public FastOS_Application
{
diff --git a/configutil/src/lib/configstatus.cpp b/configutil/src/lib/configstatus.cpp
index 5063a6d09cc..bd3b9cb43ea 100644
--- a/configutil/src/lib/configstatus.cpp
+++ b/configutil/src/lib/configstatus.cpp
@@ -1,19 +1,16 @@
// 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/log/log.h>
-LOG_SETUP("vespa-config-status");
-#include <iostream>
-
+#include "configstatus.h"
+#include "tags.h"
#include <vespa/fnet/frt/frt.h>
#include <vespa/vespalib/data/slime/slime.h>
#include <vbench/http/http_result_handler.h>
#include <vbench/http/server_spec.h>
#include <vbench/http/http_client.h>
+#include <iostream>
-#include <lib/tags.h>
-
-#include "configstatus.h"
+#include <vespa/log/log.h>
+LOG_SETUP("vespa-config-status");
using configdefinitions::tagsContain;
diff --git a/configutil/src/lib/tags.cpp b/configutil/src/lib/tags.cpp
index 50b01c80ba2..8a20d1a1b6d 100644
--- a/configutil/src/lib/tags.cpp
+++ b/configutil/src/lib/tags.cpp
@@ -1,10 +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/vespalib/stllike/string.h>
-
#include "tags.h"
+#include <vespa/vespalib/stllike/string.h>
namespace configdefinitions {
diff --git a/fastos/src/vespa/fastos/app.h b/fastos/src/vespa/fastos/app.h
index b025efa9ea2..75fb5c30d43 100644
--- a/fastos/src/vespa/fastos/app.h
+++ b/fastos/src/vespa/fastos/app.h
@@ -34,7 +34,7 @@ class FastOS_ProcessInterface;
*
* Example:
* @code
- * #include <vespa/fastos/fastos.h>
+ * #include <vespa/fastos/app.h>
*
* class MyApplication : public FastOS_Application
* {
@@ -59,7 +59,7 @@ class FastOS_ProcessInterface;
* @ref Cleanup(). Most applications do not need to do this, but
* an example of how to do it is included anyway:
* @code
- * #include <vespa/fastos/fastos.h>
+ * #include <vespa/fastos/app.h>
*
* class MyApplication : public FastOS_Application
* {
diff --git a/fnet/src/vespa/fnet/connect_thread.cpp b/fnet/src/vespa/fnet/connect_thread.cpp
index 0e74a853886..8c1b38596de 100644
--- a/fnet/src/vespa/fnet/connect_thread.cpp
+++ b/fnet/src/vespa/fnet/connect_thread.cpp
@@ -1,7 +1,5 @@
// 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 "connect_thread.h"
namespace fnet {
diff --git a/frtstream/src/example/simple.cpp b/frtstream/src/example/simple.cpp
index 000a9edbc8f..5d4a5d067c7 100644
--- a/frtstream/src/example/simple.cpp
+++ b/frtstream/src/example/simple.cpp
@@ -1,14 +1,8 @@
// 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 <iostream>
-#include <csignal>
-#include <vector>
-#include <string>
-#include <set>
+#include <vespa/fastos/app.h>
#include <vespa/frtstream/frtclientstream.h>
-
using namespace std;
using frtstream::FrtClientStream;
using frtstream::Method;
diff --git a/frtstream/src/vespa/frtstream/frtclientstream.cpp b/frtstream/src/vespa/frtstream/frtclientstream.cpp
index 5c8de136fd4..142b0d1fda0 100644
--- a/frtstream/src/vespa/frtstream/frtclientstream.cpp
+++ b/frtstream/src/vespa/frtstream/frtclientstream.cpp
@@ -1,11 +1,9 @@
// 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/frtstream/frtclientstream.h>
+#include "frtclientstream.h"
using namespace fnet;
-
namespace frtstream {
FrtClientStream::FrtClientStream(const std::string& connectionSpec)
diff --git a/frtstream/src/vespa/frtstream/frtstream.cpp b/frtstream/src/vespa/frtstream/frtstream.cpp
index 0e45f823f12..9b549a90120 100644
--- a/frtstream/src/vespa/frtstream/frtstream.cpp
+++ b/frtstream/src/vespa/frtstream/frtstream.cpp
@@ -1,11 +1,9 @@
// 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 "frtstream.h"
#include <algorithm>
#include <ostream>
-
-#include <vespa/frtstream/frtstream.h>
-
using namespace fnet;
namespace frtstream {
diff --git a/logd/src/logd/watch.cpp b/logd/src/logd/watch.cpp
index 19dc97163e8..7e251ac2888 100644
--- a/logd/src/logd/watch.cpp
+++ b/logd/src/logd/watch.cpp
@@ -1,18 +1,4 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-#include <stdlib.h>
-#include <string.h>
-#include <stdio.h>
-#include <fcntl.h>
-#include <errno.h>
-#include <unistd.h>
-#include <time.h>
-#include <glob.h>
-#include <sys/stat.h>
-
-#include <vespa/fastos/fastos.h>
-#include <vespa/log/log.h>
-LOG_SETUP("");
-LOG_RCSID("$Id$");
#include "errhandle.h"
#include "sigterm.h"
@@ -22,6 +8,10 @@ LOG_RCSID("$Id$");
#include "watch.h"
#include "perform.h"
#include "cmdbuf.h"
+#include <glob.h>
+
+LOG_SETUP("");
+LOG_RCSID("$Id$");
namespace logdemon {
namespace {
diff --git a/persistence/src/vespa/persistence/proxy/buildid.cpp b/persistence/src/vespa/persistence/proxy/buildid.cpp
index c78af647de2..4ca20a3a5d1 100644
--- a/persistence/src/vespa/persistence/proxy/buildid.cpp
+++ b/persistence/src/vespa/persistence/proxy/buildid.cpp
@@ -1,8 +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/vespalib/component/vtag.h>
#include "buildid.h"
+#include <vespa/vespalib/component/vtag.h>
const char *storage::spi::getBuildId() {
return vespalib::VersionTagComponent;
diff --git a/persistence/src/vespa/persistence/proxy/providerproxy.cpp b/persistence/src/vespa/persistence/proxy/providerproxy.cpp
index 7c3b5250c8c..72936bbda6c 100644
--- a/persistence/src/vespa/persistence/proxy/providerproxy.cpp
+++ b/persistence/src/vespa/persistence/proxy/providerproxy.cpp
@@ -1,6 +1,5 @@
// 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 "providerproxy.h"
#include "buildid.h"
#include <vespa/document/repo/documenttyperepo.h>
diff --git a/persistence/src/vespa/persistence/proxy/providerstub.cpp b/persistence/src/vespa/persistence/proxy/providerstub.cpp
index f7c73ae009a..94d4811c0d6 100644
--- a/persistence/src/vespa/persistence/proxy/providerstub.cpp
+++ b/persistence/src/vespa/persistence/proxy/providerstub.cpp
@@ -1,6 +1,5 @@
// 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 "buildid.h"
#include "providerstub.h"
#include <vespa/document/serialization/vespadocumentdeserializer.h>
@@ -13,18 +12,13 @@
#include <persistence/spi/types.h>
#include <vespa/vespalib/objects/nbostream.h>
#include <vespa/vespalib/util/closuretask.h>
-#include <sstream>
#include <vespa/document/fieldset/fieldsetrepo.h>
-#include <vespa/log/log.h>
-LOG_SETUP(".providerstub");
using document::BucketId;
using document::ByteBuffer;
using document::DocumentTypeRepo;
using document::VespaDocumentDeserializer;
using document::VespaDocumentSerializer;
-using std::map;
-using std::ostringstream;
using std::vector;
using vespalib::Closure;
using vespalib::makeClosure;
diff --git a/persistence/src/vespa/persistence/spi/abstractpersistenceprovider.cpp b/persistence/src/vespa/persistence/spi/abstractpersistenceprovider.cpp
index 083af32672d..a4070b619d5 100644
--- a/persistence/src/vespa/persistence/spi/abstractpersistenceprovider.cpp
+++ b/persistence/src/vespa/persistence/spi/abstractpersistenceprovider.cpp
@@ -1,5 +1,5 @@
// 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 "abstractpersistenceprovider.h"
#include <vespa/document/update/documentupdate.h>
#include <vespa/document/fieldset/fieldsets.h>
diff --git a/persistence/src/vespa/persistence/spi/partitionstate.cpp b/persistence/src/vespa/persistence/spi/partitionstate.cpp
index a8618b4bea8..0c3b4f95a34 100644
--- a/persistence/src/vespa/persistence/spi/partitionstate.cpp
+++ b/persistence/src/vespa/persistence/spi/partitionstate.cpp
@@ -1,7 +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/persistence/spi/partitionstate.h>
+#include "partitionstate.h"
#include <vespa/vespalib/util/exceptions.h>
#include <vespa/vespalib/stllike/asciistream.h>
diff --git a/persistence/src/vespa/persistence/spi/persistenceprovider.cpp b/persistence/src/vespa/persistence/spi/persistenceprovider.cpp
index e6befc36c7e..f07797fb93e 100644
--- a/persistence/src/vespa/persistence/spi/persistenceprovider.cpp
+++ b/persistence/src/vespa/persistence/spi/persistenceprovider.cpp
@@ -1,14 +1,11 @@
// 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/persistence/spi/persistenceprovider.h>
+#include "persistenceprovider.h"
namespace storage {
namespace spi {
-PersistenceProvider::~PersistenceProvider()
-{
-}
+PersistenceProvider::~PersistenceProvider() { }
} // spi
} // storage
diff --git a/persistencetypes/src/persistence/spi/types.cpp b/persistencetypes/src/persistence/spi/types.cpp
index 2219175a395..3ca3c1a7c5a 100644
--- a/persistencetypes/src/persistence/spi/types.cpp
+++ b/persistencetypes/src/persistence/spi/types.cpp
@@ -1,13 +1,11 @@
// 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 "types.h"
+
#include <vespa/vespalib/objects/nbostream.h>
-namespace storage
-{
+namespace storage {
-namespace spi
-{
+namespace spi {
DEFINE_PRIMITIVE_WRAPPER_NBOSTREAM(NodeIndex);
DEFINE_PRIMITIVE_WRAPPER_NBOSTREAM(PartitionId);
diff --git a/searchcommon/src/vespa/searchcommon/common/schemaconfigurer.cpp b/searchcommon/src/vespa/searchcommon/common/schemaconfigurer.cpp
index 56acb3d8ec2..e6e081831e5 100644
--- a/searchcommon/src/vespa/searchcommon/common/schemaconfigurer.cpp
+++ b/searchcommon/src/vespa/searchcommon/common/schemaconfigurer.cpp
@@ -1,10 +1,9 @@
// 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/log/log.h>
+#include "schemaconfigurer.h"
#include <vespa/searchcommon/config/subscriptionproxyng.h>
-#include <vespa/searchcommon/common/schemaconfigurer.h>
+#include <vespa/log/log.h>
LOG_SETUP(".index.schemaconfigurer");
using namespace config;
diff --git a/searchcore/src/vespa/searchcore/fdispatch/common/stdincl.h b/searchcore/src/vespa/searchcore/fdispatch/common/stdincl.h
index f0378b951a4..f6649cb7357 100644
--- a/searchcore/src/vespa/searchcore/fdispatch/common/stdincl.h
+++ b/searchcore/src/vespa/searchcore/fdispatch/common/stdincl.h
@@ -1,9 +1,9 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-// Copyright (C) 1999-2003 Fast Search & Transfer ASA
-// Copyright (C) 2003 Overture Services Norway AS
#pragma once
+#include <cstdint>
+
/**
* This method defines the illegal/undefined value for unsigned 32-bit
* integer ids.
diff --git a/searchcore/src/vespa/searchcore/fdispatch/search/configdesc.cpp b/searchcore/src/vespa/searchcore/fdispatch/search/configdesc.cpp
index 4a71bc1f3fa..773f6607a9c 100644
--- a/searchcore/src/vespa/searchcore/fdispatch/search/configdesc.cpp
+++ b/searchcore/src/vespa/searchcore/fdispatch/search/configdesc.cpp
@@ -1,12 +1,9 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-// Copyright (C) 1998-2003 Fast Search & Transfer ASA
-// Copyright (C) 2003 Overture Services Norway AS
-#include <vespa/fastos/fastos.h>
-#include <vespa/log/log.h>
+#include "configdesc.h"
#include <vespa/searchcore/util/log.h>
-#include <vespa/searchcore/fdispatch/search/configdesc.h>
+#include <vespa/log/log.h>
LOG_SETUP(".search.configdesc");
//----------------------------------------------------------------------
diff --git a/searchcore/src/vespa/searchcore/fdispatch/search/configdesc.h b/searchcore/src/vespa/searchcore/fdispatch/search/configdesc.h
index ea873d3ab30..9f2a65c2f91 100644
--- a/searchcore/src/vespa/searchcore/fdispatch/search/configdesc.h
+++ b/searchcore/src/vespa/searchcore/fdispatch/search/configdesc.h
@@ -1,12 +1,11 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-// Copyright (C) 1998-2003 Fast Search & Transfer ASA
-// Copyright (C) 2003 Overture Services Norway AS
#pragma once
#include <vespa/searchlib/common/fslimits.h>
#include <vespa/searchcore/fdispatch/common/stdincl.h>
#include <vespa/searchcore/config/config-partitions.h>
+#include <cassert>
using vespa::config::search::core::PartitionsConfig;
@@ -35,8 +34,7 @@ public:
_unitrefcost(1),
_isBad(false),
_confPartIDOverrides(false)
- {
- }
+ { }
void SetNext(FastS_EngineDesc *next) { _next = next; }
void SetConfPartID(int32_t value) { assert(value >= 0); _confPartID = value; }
diff --git a/searchsummary/src/vespa/searchsummary/docsummary/attributedfw.cpp b/searchsummary/src/vespa/searchsummary/docsummary/attributedfw.cpp
index eb5219153c1..71f15b0d894 100644
--- a/searchsummary/src/vespa/searchsummary/docsummary/attributedfw.cpp
+++ b/searchsummary/src/vespa/searchsummary/docsummary/attributedfw.cpp
@@ -1,12 +1,12 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+#include "docsumwriter.h"
+#include "attributedfw.h"
+#include "docsumstate.h"
#include <vespa/searchlib/attribute/stringbase.h>
#include <vespa/searchlib/attribute/integerbase.h>
#include <vespa/searchlib/attribute/floatbase.h>
#include <vespa/searchlib/tensor/tensor_attribute.h>
-#include "docsumwriter.h"
-#include "attributedfw.h"
-#include "docsumstate.h"
#include <vespa/eval/tensor/tensor.h>
#include <vespa/eval/tensor/serialization/typed_binary_format.h>
#include <vespa/vespalib/objects/nbostream.h>
diff --git a/searchsummary/src/vespa/searchsummary/docsummary/docsumconfig.cpp b/searchsummary/src/vespa/searchsummary/docsummary/docsumconfig.cpp
index 82616381e88..5eb7d99473f 100644
--- a/searchsummary/src/vespa/searchsummary/docsummary/docsumconfig.cpp
+++ b/searchsummary/src/vespa/searchsummary/docsummary/docsumconfig.cpp
@@ -1,16 +1,14 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-// Copyright (C) 1998-2003 Fast Search & Transfer ASA
-// Copyright (C) 2003 Overture Services Norway AS
-#include <vespa/searchsummary/docsummary/docsumconfig.h>
-#include <vespa/searchsummary/docsummary/docsumwriter.h>
-#include <vespa/searchsummary/docsummary/idocsumenvironment.h>
-#include <vespa/searchsummary/docsummary/rankfeaturesdfw.h>
-#include <vespa/searchsummary/docsummary/textextractordfw.h>
-#include <vespa/searchsummary/docsummary/geoposdfw.h>
-#include <vespa/searchsummary/docsummary/positionsdfw.h>
-#include <vespa/searchsummary/docsummary/juniperdfw.h>
-#include <vespa/vespalib/util/vstringfmt.h>
+#include "docsumconfig.h"
+#include "docsumwriter.h"
+#include "idocsumenvironment.h"
+#include "rankfeaturesdfw.h"
+#include "textextractordfw.h"
+#include "geoposdfw.h"
+#include "positionsdfw.h"
+#include "juniperdfw.h"
+#include <vespa/vespalib/util/stringfmt.h>
#include <vespa/vespalib/util/exceptions.h>
namespace search {
diff --git a/searchsummary/src/vespa/searchsummary/docsummary/docsumfieldwriter.cpp b/searchsummary/src/vespa/searchsummary/docsummary/docsumfieldwriter.cpp
index ba30940f5e0..e71b4d0fe69 100644
--- a/searchsummary/src/vespa/searchsummary/docsummary/docsumfieldwriter.cpp
+++ b/searchsummary/src/vespa/searchsummary/docsummary/docsumfieldwriter.cpp
@@ -1,18 +1,15 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-// Copyright (C) 1998-2003 Fast Search & Transfer ASA
-// Copyright (C) 2003 Overture Services Norway AS
-#include <vespa/fastos/fastos.h>
-#include <vespa/log/log.h>
-#include <vespa/searchlib/attribute/iattributemanager.h>
-#include <vespa/searchlib/common/documentlocations.h>
-#include <vespa/searchlib/common/location.h>
#include "docsumfieldwriter.h"
#include "idocsumenvironment.h"
#include "docsumformat.h"
#include "docsumstate.h"
+#include <vespa/searchlib/attribute/iattributemanager.h>
+#include <vespa/searchlib/common/documentlocations.h>
+#include <vespa/searchlib/common/location.h>
#include <vespa/searchlib/parsequery/stackdumpiterator.h>
+#include <vespa/log/log.h>
LOG_SETUP(".searchlib.docsummary.docsumfieldwriter");
namespace search {
@@ -29,14 +26,10 @@ const vespalib::string IDocsumFieldWriter::_empty("");
//--------------------------------------------------------------------------
-EmptyDFW::EmptyDFW()
-{
-}
+EmptyDFW::EmptyDFW() { }
-EmptyDFW::~EmptyDFW()
-{
-}
+EmptyDFW::~EmptyDFW() { }
void
EmptyDFW::insertField(uint32_t /*docid*/,
diff --git a/searchsummary/src/vespa/searchsummary/docsummary/docsumformat.cpp b/searchsummary/src/vespa/searchsummary/docsummary/docsumformat.cpp
index 27b20f8b1bd..f964eafb2c9 100644
--- a/searchsummary/src/vespa/searchsummary/docsummary/docsumformat.cpp
+++ b/searchsummary/src/vespa/searchsummary/docsummary/docsumformat.cpp
@@ -1,17 +1,10 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-// Copyright (C) 1998-2003 Fast Search & Transfer ASA
-// Copyright (C) 2003 Overture Services Norway AS
-#include <vespa/fastos/fastos.h>
-#include <vespa/log/log.h>
-#include <vespa/searchsummary/docsummary/docsumformat.h>
+#include "docsumformat.h"
namespace search {
namespace docsummary {
-LOG_SETUP(".searchlib.docsummary.docsumformat");
-
-
size_t
DocsumFormat::addByte(search::RawBuf &target, uint8_t value)
@@ -101,7 +94,7 @@ DocsumFormat::addEmpty(ResType type, search::RawBuf &target)
case RES_FEATUREDATA:
return addLongData(target, "", 0);
}
- LOG_ASSERT(type <= RES_FEATUREDATA);
+ assert(type <= RES_FEATUREDATA);
return 0;
}
diff --git a/searchsummary/src/vespa/searchsummary/docsummary/docsumstate.cpp b/searchsummary/src/vespa/searchsummary/docsummary/docsumstate.cpp
index d81a45be6de..b8753898014 100644
--- a/searchsummary/src/vespa/searchsummary/docsummary/docsumstate.cpp
+++ b/searchsummary/src/vespa/searchsummary/docsummary/docsumstate.cpp
@@ -1,8 +1,5 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-// Copyright (C) 1998-2003 Fast Search & Transfer ASA
-// Copyright (C) 2003 Overture Services Norway AS
-#include <vespa/fastos/fastos.h>
#include "docsumstate.h"
#include <vespa/juniper/rpinterface.h>
#include <vespa/searchcommon/attribute/iattributecontext.h>
diff --git a/searchsummary/src/vespa/searchsummary/docsummary/docsumwriter.cpp b/searchsummary/src/vespa/searchsummary/docsummary/docsumwriter.cpp
index 4273c89d7f5..01ebf333fe2 100644
--- a/searchsummary/src/vespa/searchsummary/docsummary/docsumwriter.cpp
+++ b/searchsummary/src/vespa/searchsummary/docsummary/docsumwriter.cpp
@@ -1,8 +1,5 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-// Copyright (C) 1998-2003 Fast Search & Transfer ASA
-// Copyright (C) 2003 Overture Services Norway AS
-#include <vespa/fastlib/text/normwordfolder.h>
#include "docsumwriter.h"
#include "docsumformat.h"
#include "docsumstate.h"
@@ -10,6 +7,7 @@
#include <vespa/searchlib/util/slime_output_raw_buf_adapter.h>
#include <vespa/searchlib/attribute/iattributemanager.h>
#include <vespa/vespalib/data/slime/slime.h>
+#include <vespa/fastlib/text/normwordfolder.h>
#include <vespa/log/log.h>
LOG_SETUP(".searchlib.docsummary.docsumwriter");
diff --git a/searchsummary/src/vespa/searchsummary/docsummary/dynamicteaserdfw.cpp b/searchsummary/src/vespa/searchsummary/docsummary/dynamicteaserdfw.cpp
index f18cf1a4da4..bd83f821ff1 100644
--- a/searchsummary/src/vespa/searchsummary/docsummary/dynamicteaserdfw.cpp
+++ b/searchsummary/src/vespa/searchsummary/docsummary/dynamicteaserdfw.cpp
@@ -1,24 +1,20 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-// Copyright (C) 1998-2003 Fast Search & Transfer ASA
-// Copyright (C) 2003 Overture Services Norway AS
-#include <vespa/fastos/fastos.h>
-#include <cstdio>
-#include <vespa/log/log.h>
#include "juniperdfw.h"
+#include "docsumwriter.h"
+#include "docsumfieldwriter.h"
+#include "docsumstate.h"
+#include "keywordextractor.h"
+#include "docsumformat.h"
#include <vespa/searchlib/parsequery/stackdumpiterator.h>
#include <vespa/searchlib/util/rawbuf.h>
#include <vespa/searchlib/queryeval/split_float.h>
#include <vespa/searchlib/fef/properties.h>
-#include <vespa/searchsummary/docsummary/docsumwriter.h>
-#include <vespa/searchsummary/docsummary/docsumfieldwriter.h>
-#include <vespa/searchsummary/docsummary/docsumstate.h>
-#include <vespa/searchsummary/docsummary/keywordextractor.h>
-#include <vespa/searchsummary/docsummary/docsumformat.h>
#include <vespa/vespalib/objects/hexdump.h>
#include <vespa/juniper/config.h>
+#include <vespa/log/log.h>
LOG_SETUP(".searchlib.docsummary.dynamicteaserdfw");
namespace juniper {
@@ -317,9 +313,7 @@ JuniperDFW::JuniperDFW(juniper::Juniper * juniper)
}
-JuniperDFW::~JuniperDFW()
-{
-}
+JuniperDFW::~JuniperDFW() { }
bool
JuniperDFW::Init(
diff --git a/searchsummary/src/vespa/searchsummary/docsummary/juniperproperties.cpp b/searchsummary/src/vespa/searchsummary/docsummary/juniperproperties.cpp
index fc434998465..62785709703 100644
--- a/searchsummary/src/vespa/searchsummary/docsummary/juniperproperties.cpp
+++ b/searchsummary/src/vespa/searchsummary/docsummary/juniperproperties.cpp
@@ -1,10 +1,11 @@
// 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/searchcommon/config/subscriptionproxyng.h>
-#include <vespa/vespalib/util/vstringfmt.h>
+
#include "juniperproperties.h"
+#include <vespa/searchcommon/config/subscriptionproxyng.h>
+#include <vespa/vespalib/util/stringfmt.h>
using vespa::config::search::summary::JuniperrcConfig;
+using vespalib::make_string;
namespace search {
namespace docsummary {
@@ -56,34 +57,34 @@ JuniperProperties::configure(const JuniperrcConfig &cfg)
{
reset();
_properties["juniper.dynsum.fallback"] = cfg.prefix ? "prefix" : "none";
- _properties["juniper.dynsum.length"] = vespalib::make_vespa_string("%d", cfg.length);
- _properties["juniper.dynsum.max_matches"] = vespalib::make_vespa_string("%d", cfg.maxMatches);
- _properties["juniper.dynsum.min_length"] = vespalib::make_vespa_string("%d", cfg.minLength);
- _properties["juniper.dynsum.surround_max"] = vespalib::make_vespa_string("%d", cfg.surroundMax);
- _properties["juniper.matcher.winsize"] = vespalib::make_vespa_string("%d", cfg.winsize);
- _properties["juniper.matcher.winsize_fallback_multiplier"] = vespalib::make_vespa_string("%f", cfg.winsizeFallbackMultiplier);
- _properties["juniper.matcher.max_match_candidates"] = vespalib::make_vespa_string("%d", cfg.maxMatchCandidates);
- _properties["juniper.stem.min_length"] = vespalib::make_vespa_string("%d", cfg.stemMinLength);
- _properties["juniper.stem.max_extend"] = vespalib::make_vespa_string("%d", cfg.stemMaxExtend);
+ _properties["juniper.dynsum.length"] = make_string("%d", cfg.length);
+ _properties["juniper.dynsum.max_matches"] = make_string("%d", cfg.maxMatches);
+ _properties["juniper.dynsum.min_length"] = make_string("%d", cfg.minLength);
+ _properties["juniper.dynsum.surround_max"] = make_string("%d", cfg.surroundMax);
+ _properties["juniper.matcher.winsize"] = make_string("%d", cfg.winsize);
+ _properties["juniper.matcher.winsize_fallback_multiplier"] = make_string("%f", cfg.winsizeFallbackMultiplier);
+ _properties["juniper.matcher.max_match_candidates"] = make_string("%d", cfg.maxMatchCandidates);
+ _properties["juniper.stem.min_length"] = make_string("%d", cfg.stemMinLength);
+ _properties["juniper.stem.max_extend"] = make_string("%d", cfg.stemMaxExtend);
for (uint32_t i = 0; i < cfg.override.size(); ++i) {
const JuniperrcConfig::Override &override = cfg.override[i];
- const vespalib::string keyDynsum = vespalib::make_vespa_string("%s.dynsum.", override.fieldname.c_str());
- const vespalib::string keyMatcher = vespalib::make_vespa_string("%s.matcher.", override.fieldname.c_str());
- const vespalib::string keyStem = vespalib::make_vespa_string("%s.stem.", override.fieldname.c_str());
+ const vespalib::string keyDynsum = make_string("%s.dynsum.", override.fieldname.c_str());
+ const vespalib::string keyMatcher = make_string("%s.matcher.", override.fieldname.c_str());
+ const vespalib::string keyStem = make_string("%s.stem.", override.fieldname.c_str());
_properties[keyDynsum + "fallback"] = override.prefix ? "prefix" : "none";
- _properties[keyDynsum + "length"] = vespalib::make_vespa_string("%d", override.length);
- _properties[keyDynsum + "max_matches"] = vespalib::make_vespa_string("%d", override.maxMatches);
- _properties[keyDynsum + "min_length"] = vespalib::make_vespa_string("%d", override.minLength);
- _properties[keyDynsum + "surround_max"] = vespalib::make_vespa_string("%d", override.surroundMax);
+ _properties[keyDynsum + "length"] = make_string("%d", override.length);
+ _properties[keyDynsum + "max_matches"] = make_string("%d", override.maxMatches);
+ _properties[keyDynsum + "min_length"] = make_string("%d", override.minLength);
+ _properties[keyDynsum + "surround_max"] = make_string("%d", override.surroundMax);
- _properties[keyMatcher + "winsize"] = vespalib::make_vespa_string("%d", override.winsize);
- _properties[keyMatcher + "winsize_fallback_multiplier"] = vespalib::make_vespa_string("%f", override.winsizeFallbackMultiplier);
- _properties[keyMatcher + "max_match_candidates"] = vespalib::make_vespa_string("%d", override.maxMatchCandidates);
+ _properties[keyMatcher + "winsize"] = make_string("%d", override.winsize);
+ _properties[keyMatcher + "winsize_fallback_multiplier"] = make_string("%f", override.winsizeFallbackMultiplier);
+ _properties[keyMatcher + "max_match_candidates"] = make_string("%d", override.maxMatchCandidates);
- _properties[keyStem + "min_length"] = vespalib::make_vespa_string("%d", override.stemMinLength);
- _properties[keyStem + "max_extend"] = vespalib::make_vespa_string("%d", override.stemMaxExtend);
+ _properties[keyStem + "min_length"] = make_string("%d", override.stemMinLength);
+ _properties[keyStem + "max_extend"] = make_string("%d", override.stemMaxExtend);
}
}
diff --git a/searchsummary/src/vespa/searchsummary/docsummary/keywordextractor.cpp b/searchsummary/src/vespa/searchsummary/docsummary/keywordextractor.cpp
index 88cc784f9d1..5b38a00fa3b 100644
--- a/searchsummary/src/vespa/searchsummary/docsummary/keywordextractor.cpp
+++ b/searchsummary/src/vespa/searchsummary/docsummary/keywordextractor.cpp
@@ -1,13 +1,10 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-// Copyright (C) 1998-2003 Fast Search & Transfer ASA
-// Copyright (C) 2003 Overture Services Norway AS
-#include <vespa/fastos/fastos.h>
-#include <vespa/searchlib/parsequery/stackdumpiterator.h>
-#include <vespa/searchlib/util/rawbuf.h>
#include "docsumstate.h"
#include "keywordextractor.h"
#include "idocsumenvironment.h"
+#include <vespa/searchlib/parsequery/stackdumpiterator.h>
+#include <vespa/searchlib/util/rawbuf.h>
/** Tell us what parts of the query we are interested in */
diff --git a/searchsummary/src/vespa/searchsummary/docsummary/rankfeaturesdfw.cpp b/searchsummary/src/vespa/searchsummary/docsummary/rankfeaturesdfw.cpp
index 07c82382233..629bd37b155 100644
--- a/searchsummary/src/vespa/searchsummary/docsummary/rankfeaturesdfw.cpp
+++ b/searchsummary/src/vespa/searchsummary/docsummary/rankfeaturesdfw.cpp
@@ -1,11 +1,11 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-#include <vespa/searchlib/common/featureset.h>
-#include <vespa/searchlib/common/packets.h>
#include "rankfeaturesdfw.h"
-#include <vespa/searchlib/common/feature.h>
#include "docsumformat.h"
#include "docsumstate.h"
+#include <vespa/searchlib/common/feature.h>
+#include <vespa/searchlib/common/featureset.h>
+#include <vespa/searchlib/common/packets.h>
#include <vespa/vespalib/data/slime/cursor.h>
namespace search {
diff --git a/searchsummary/src/vespa/searchsummary/docsummary/resultclass.cpp b/searchsummary/src/vespa/searchsummary/docsummary/resultclass.cpp
index ed5f41fcdd8..9c28861eee6 100644
--- a/searchsummary/src/vespa/searchsummary/docsummary/resultclass.cpp
+++ b/searchsummary/src/vespa/searchsummary/docsummary/resultclass.cpp
@@ -1,6 +1,4 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-// Copyright (C) 1998-2003 Fast Search & Transfer ASA
-// Copyright (C) 2003 Overture Services Norway AS
#include "resultclass.h"
diff --git a/searchsummary/src/vespa/searchsummary/docsummary/resultpacker.cpp b/searchsummary/src/vespa/searchsummary/docsummary/resultpacker.cpp
index bda2f5c1b74..292bb165893 100644
--- a/searchsummary/src/vespa/searchsummary/docsummary/resultpacker.cpp
+++ b/searchsummary/src/vespa/searchsummary/docsummary/resultpacker.cpp
@@ -1,11 +1,9 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-// Copyright (C) 1998-2003 Fast Search & Transfer ASA
-// Copyright (C) 2003 Overture Services Norway AS
-#include <vespa/log/log.h>
+#include "resultpacker.h"
#include <vespa/searchcommon/common/undefinedvalues.h>
-#include <vespa/searchsummary/docsummary/resultpacker.h>
+#include <vespa/log/log.h>
LOG_SETUP(".searchlib.docsummary.resultpacker");
namespace search {
diff --git a/searchsummary/src/vespa/searchsummary/docsummary/summaryfeaturesdfw.cpp b/searchsummary/src/vespa/searchsummary/docsummary/summaryfeaturesdfw.cpp
index 66e50fdff1a..758162f5e97 100644
--- a/searchsummary/src/vespa/searchsummary/docsummary/summaryfeaturesdfw.cpp
+++ b/searchsummary/src/vespa/searchsummary/docsummary/summaryfeaturesdfw.cpp
@@ -1,10 +1,10 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-#include <vespa/searchlib/common/featureset.h>
-#include <vespa/searchlib/common/packets.h>
#include "docsumformat.h"
#include "summaryfeaturesdfw.h"
#include "docsumstate.h"
+#include <vespa/searchlib/common/featureset.h>
+#include <vespa/searchlib/common/packets.h>
#include <vespa/vespalib/data/slime/cursor.h>
#include <cmath>
diff --git a/searchsummary/src/vespa/searchsummary/docsummary/textextractordfw.cpp b/searchsummary/src/vespa/searchsummary/docsummary/textextractordfw.cpp
index 716c4a024d8..67a7f9e8da6 100644
--- a/searchsummary/src/vespa/searchsummary/docsummary/textextractordfw.cpp
+++ b/searchsummary/src/vespa/searchsummary/docsummary/textextractordfw.cpp
@@ -1,9 +1,9 @@
// 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 "tokenizer.h"
#include "textextractordfw.h"
#include "docsumstate.h"
+
#include <vespa/log/log.h>
LOG_SETUP(".searchlib.docsummary.textextractordfw");
diff --git a/searchsummary/src/vespa/searchsummary/docsummary/tokenizer.cpp b/searchsummary/src/vespa/searchsummary/docsummary/tokenizer.cpp
index 61a0f8cdfdd..6e0c018950d 100644
--- a/searchsummary/src/vespa/searchsummary/docsummary/tokenizer.cpp
+++ b/searchsummary/src/vespa/searchsummary/docsummary/tokenizer.cpp
@@ -1,9 +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/log/log.h>
-LOG_SETUP(".summary.tokenizer");
#include "tokenizer.h"
+#include <cassert>
namespace search {
namespace docsummary {
@@ -103,7 +101,7 @@ Tokenizer::getNextToken()
_pos = next;
}
- LOG_ASSERT(_pos == _end);
+ assert(_pos == _end);
_hasMoreTokens = false;
return Token(textBegin, _pos, _type); // return the last token
}
diff --git a/searchsummary/src/vespa/searchsummary/docsummary/urlresult.cpp b/searchsummary/src/vespa/searchsummary/docsummary/urlresult.cpp
index c895b2a52b1..0d3a212fc1f 100644
--- a/searchsummary/src/vespa/searchsummary/docsummary/urlresult.cpp
+++ b/searchsummary/src/vespa/searchsummary/docsummary/urlresult.cpp
@@ -1,13 +1,10 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-// Copyright (C) 1998-2003 Fast Search & Transfer ASA
-// Copyright (C) 2003 Overture Services Norway AS
-#include <vespa/fastos/fastos.h>
-#include <vespa/log/log.h>
-#include <vespa/searchsummary/docsummary/urlresult.h>
-#include <vespa/searchsummary/docsummary/resultconfig.h>
+#include "urlresult.h"
+#include "resultconfig.h"
#include <zlib.h>
+#include <vespa/log/log.h>
LOG_SETUP(".searchlib.docsummary.urlresult");
namespace search {
@@ -17,12 +14,10 @@ urlresult::urlresult(uint32_t partition, uint32_t docid, HitRank metric)
: _partition(partition),
_docid(docid),
_metric(metric)
-{}
+{ }
-urlresult::~urlresult()
-{
-}
+urlresult::~urlresult() { }
/*===============================================================*/
@@ -30,16 +25,15 @@ urlresult::~urlresult()
badurlresult::badurlresult()
: urlresult(0, 0, 0)
-{}
+{ }
badurlresult::badurlresult(uint32_t partition, uint32_t docid, HitRank metric)
: urlresult(partition, docid, metric)
-{}
+{ }
-badurlresult::~badurlresult()
-{}
+badurlresult::~badurlresult() { }
int
diff --git a/storageserver/src/apps/storaged/forcelink.cpp b/storageserver/src/apps/storaged/forcelink.cpp
index 2c628644e82..24d9d46d1df 100644
--- a/storageserver/src/apps/storaged/forcelink.cpp
+++ b/storageserver/src/apps/storaged/forcelink.cpp
@@ -1,6 +1,5 @@
// 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/document/base/forcelink.h>
#include <vespa/documentapi/documentapi.h>
#include <vespa/searchlib/aggregation/forcelink.hpp>
diff --git a/storageserver/src/vespa/storageserver/app/dummyservicelayerprocess.cpp b/storageserver/src/vespa/storageserver/app/dummyservicelayerprocess.cpp
index c57d7667248..4b1b0169f31 100644
--- a/storageserver/src/vespa/storageserver/app/dummyservicelayerprocess.cpp
+++ b/storageserver/src/vespa/storageserver/app/dummyservicelayerprocess.cpp
@@ -1,11 +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/storageserver/app/dummyservicelayerprocess.h>
-
-#include <vespa/log/log.h>
-
-LOG_SETUP(".process.servicelayer");
+#include "dummyservicelayerprocess.h"
namespace storage {
diff --git a/storageserver/src/vespa/storageserver/app/memfileservicelayerprocess.cpp b/storageserver/src/vespa/storageserver/app/memfileservicelayerprocess.cpp
index c85a3af8a69..9e18d1a11ac 100644
--- a/storageserver/src/vespa/storageserver/app/memfileservicelayerprocess.cpp
+++ b/storageserver/src/vespa/storageserver/app/memfileservicelayerprocess.cpp
@@ -1,10 +1,8 @@
// 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/storageserver/app/memfileservicelayerprocess.h>
+#include "memfileservicelayerprocess.h"
#include <vespa/log/log.h>
-
LOG_SETUP(".process.servicelayer");
namespace storage {
diff --git a/storageserver/src/vespa/storageserver/app/servicelayerprocess.cpp b/storageserver/src/vespa/storageserver/app/servicelayerprocess.cpp
index 52f47531c78..5fd048d35c2 100644
--- a/storageserver/src/vespa/storageserver/app/servicelayerprocess.cpp
+++ b/storageserver/src/vespa/storageserver/app/servicelayerprocess.cpp
@@ -1,18 +1,12 @@
// 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/storageserver/app/servicelayerprocess.h>
+#include "servicelayerprocess.h"
-#include <vespa/log/log.h>
#include <vespa/searchvisitor/searchvisitor.h>
#include <vespa/storage/storageutil/utils.h>
-LOG_SETUP(".process.servicelayer");
-
namespace storage {
-// ServiceLayerProcess implementation
-
ServiceLayerProcess::ServiceLayerProcess(const config::ConfigUri & configUri)
: Process(configUri)
{
@@ -30,8 +24,7 @@ ServiceLayerProcess::createNode()
{
_externalVisitors["searchvisitor"].reset(new SearchVisitorFactory(_configUri));
setupProvider();
- _node.reset(new ServiceLayerNode(
- _configUri, _context, *this, getProvider(), _externalVisitors));
+ _node.reset(new ServiceLayerNode(_configUri, _context, *this, getProvider(), _externalVisitors));
_node->init();
}
diff --git a/vdslib/src/vespa/vdslib/bucketdistribution.cpp b/vdslib/src/vespa/vdslib/bucketdistribution.cpp
index 95bf7a7cd1d..a06402335c2 100644
--- a/vdslib/src/vespa/vdslib/bucketdistribution.cpp
+++ b/vdslib/src/vespa/vdslib/bucketdistribution.cpp
@@ -1,10 +1,9 @@
// 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 "bucketdistribution.h"
+
#include <vespa/log/log.h>
LOG_SETUP(".bucketdistribution");
-#include "bucketdistribution.h"
-
namespace vdslib {
BucketDistribution::BucketDistribution(uint32_t numColumns, uint32_t numBucketBits) :
diff --git a/vdslib/src/vespa/vdslib/container/documentsummary.cpp b/vdslib/src/vespa/vdslib/container/documentsummary.cpp
index e1bd73a09de..3c0ff157fc3 100644
--- a/vdslib/src/vespa/vdslib/container/documentsummary.cpp
+++ b/vdslib/src/vespa/vdslib/container/documentsummary.cpp
@@ -1,5 +1,5 @@
// 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 "documentsummary.h"
namespace vdslib {
diff --git a/vdslib/src/vespa/vdslib/container/searchresult.cpp b/vdslib/src/vespa/vdslib/container/searchresult.cpp
index 6410fba020f..a6c71c3d9e3 100644
--- a/vdslib/src/vespa/vdslib/container/searchresult.cpp
+++ b/vdslib/src/vespa/vdslib/container/searchresult.cpp
@@ -1,5 +1,5 @@
// 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 "searchresult.h"
namespace vdslib {
diff --git a/vdslib/src/vespa/vdslib/container/visitorordering.cpp b/vdslib/src/vespa/vdslib/container/visitorordering.cpp
index 27a4b038959..1f4af71492b 100644
--- a/vdslib/src/vespa/vdslib/container/visitorordering.cpp
+++ b/vdslib/src/vespa/vdslib/container/visitorordering.cpp
@@ -1,5 +1,5 @@
// 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 "visitorordering.h"
#include <sstream>
diff --git a/vdslib/src/vespa/vdslib/container/visitorstatistics.cpp b/vdslib/src/vespa/vdslib/container/visitorstatistics.cpp
index f1e45d18f96..3c51c900de9 100644
--- a/vdslib/src/vespa/vdslib/container/visitorstatistics.cpp
+++ b/vdslib/src/vespa/vdslib/container/visitorstatistics.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/vdslib/container/visitorstatistics.h>
-#include <iostream>
+
+#include "visitorstatistics.h"
+#include <ostream>
namespace vdslib {
diff --git a/vdslib/src/vespa/vdslib/state/idealgroup.cpp b/vdslib/src/vespa/vdslib/state/idealgroup.cpp
index 442d91f102b..7682bca4546 100644
--- a/vdslib/src/vespa/vdslib/state/idealgroup.cpp
+++ b/vdslib/src/vespa/vdslib/state/idealgroup.cpp
@@ -1,7 +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/vdslib/state/idealgroup.h>
+#include <vespa/vdslib/state/idealgroup.h>
namespace storage {
namespace lib {
diff --git a/vdslib/src/vespa/vdslib/state/state.cpp b/vdslib/src/vespa/vdslib/state/state.cpp
index 67c77196e59..8ad8301bc25 100644
--- a/vdslib/src/vespa/vdslib/state/state.cpp
+++ b/vdslib/src/vespa/vdslib/state/state.cpp
@@ -1,6 +1,5 @@
// 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/vdslib/state/state.h>
#include <vespa/vespalib/util/exceptions.h>
diff --git a/vdslib/src/vespa/vdslib/thread/taskscheduler.cpp b/vdslib/src/vespa/vdslib/thread/taskscheduler.cpp
index f66349e28ed..6197ff73a03 100644
--- a/vdslib/src/vespa/vdslib/thread/taskscheduler.cpp
+++ b/vdslib/src/vespa/vdslib/thread/taskscheduler.cpp
@@ -1,6 +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/vdslib/thread/taskscheduler.h>
+
+#include "taskscheduler.h"
#include <vespa/vespalib/util/exceptions.h>
#include <vespa/vespalib/stllike/asciistream.h>
diff --git a/vespaclient/src/vespa/vespaclient/spoolmaster/application.cpp b/vespaclient/src/vespa/vespaclient/spoolmaster/application.cpp
index 84d271ab69e..fe0880d9ea1 100644
--- a/vespaclient/src/vespa/vespaclient/spoolmaster/application.cpp
+++ b/vespaclient/src/vespa/vespaclient/spoolmaster/application.cpp
@@ -1,12 +1,11 @@
// 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/defaults.h>
#include <vector>
#include <string>
#include <iostream>
#include <algorithm>
+#include <cstdio>
#include <dirent.h>
-#include <stdio.h>
#include <unistd.h>
#include "application.h"
diff --git a/vespaclient/src/vespa/vespaclient/spoolmaster/application.h b/vespaclient/src/vespa/vespaclient/spoolmaster/application.h
index b82a89d51e9..1e4ad9c5b9e 100644
--- a/vespaclient/src/vespa/vespaclient/spoolmaster/application.h
+++ b/vespaclient/src/vespa/vespaclient/spoolmaster/application.h
@@ -3,6 +3,7 @@
#include <string>
#include <vector>
+#include <vespa/fastos/app.h>
namespace spoolmaster {
/**
diff --git a/vespaclient/src/vespa/vespaclient/spoolmaster/main.cpp b/vespaclient/src/vespa/vespaclient/spoolmaster/main.cpp
index 1c28b03589f..8896931abdc 100644
--- a/vespaclient/src/vespa/vespaclient/spoolmaster/main.cpp
+++ b/vespaclient/src/vespa/vespaclient/spoolmaster/main.cpp
@@ -1,5 +1,5 @@
// 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 "application.h"
int
diff --git a/vespaclient/src/vespa/vespaclient/vespadoclocator/main.cpp b/vespaclient/src/vespa/vespaclient/vespadoclocator/main.cpp
index 1be39364efa..3429e715b9d 100644
--- a/vespaclient/src/vespa/vespaclient/vespadoclocator/main.cpp
+++ b/vespaclient/src/vespa/vespaclient/vespadoclocator/main.cpp
@@ -1,5 +1,5 @@
// 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 "application.h"
int
diff --git a/vespaclient/src/vespa/vespaclient/vesparoute/main.cpp b/vespaclient/src/vespa/vespaclient/vesparoute/main.cpp
index 2d3fffe66b8..8d5151e86d8 100644
--- a/vespaclient/src/vespa/vespaclient/vesparoute/main.cpp
+++ b/vespaclient/src/vespa/vespaclient/vesparoute/main.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/vespalib/util/signalhandler.h>
+
#include "application.h"
+#include <vespa/vespalib/util/signalhandler.h>
int
main(int argc, char** argv)
diff --git a/vespaclient/src/vespa/vespaclient/vesparoute/mynetwork.cpp b/vespaclient/src/vespa/vespaclient/vesparoute/mynetwork.cpp
index 573ede4e6dc..d607148318f 100644
--- a/vespaclient/src/vespa/vespaclient/vesparoute/mynetwork.cpp
+++ b/vespaclient/src/vespa/vespaclient/vesparoute/mynetwork.cpp
@@ -1,11 +1,8 @@
// 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/log/log.h>
-LOG_SETUP(".testframe");
+#include "mynetwork.h"
#include <vespa/messagebus/emptyreply.h>
#include <vespa/messagebus/sendproxy.h>
-#include "mynetwork.h"
class MyServiceAddress : public mbus::IServiceAddress {
private:
diff --git a/vespaclient/src/vespa/vespaclient/vesparoute/params.cpp b/vespaclient/src/vespa/vespaclient/vesparoute/params.cpp
index 5a085381a87..e882797180c 100644
--- a/vespaclient/src/vespa/vespaclient/vesparoute/params.cpp
+++ b/vespaclient/src/vespa/vespaclient/vesparoute/params.cpp
@@ -1,5 +1,5 @@
// 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 "params.h"
namespace vesparoute {
diff --git a/vespalog/src/vespa/log/log-assert.cpp b/vespalog/src/vespa/log/log-assert.cpp
index 2c4106816a1..620a16b9737 100644
--- a/vespalog/src/vespa/log/log-assert.cpp
+++ b/vespalog/src/vespa/log/log-assert.cpp
@@ -1,10 +1,4 @@
// 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 <sys/types.h>
-#include <cstring>
-#include <cstdlib>
-#include <cstdio>
-#include <unistd.h>
#include "log.h"
LOG_SETUP("");
diff --git a/vespalog/src/vespa/log/log.cpp b/vespalog/src/vespa/log/log.cpp
index 6ba386ba04d..7e92008504e 100644
--- a/vespalog/src/vespa/log/log.cpp
+++ b/vespalog/src/vespa/log/log.cpp
@@ -1,19 +1,8 @@
// 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 <sys/types.h>
-#include <cstring>
-#include <cstdlib>
-#include <stdarg.h>
-#include <cstdio>
-#include <sys/time.h>
-#include <unistd.h>
-#include <errno.h>
-#include <memory>
-
-#include <algorithm>
#include "log.h"
LOG_SETUP_INDIRECT(".log", "$Id$");
+
#undef LOG
#define LOG LOG_INDIRECT
@@ -22,6 +11,8 @@ LOG_SETUP_INDIRECT(".log", "$Id$");
#include "internal.h"
#include "control-file.h"
+#include <vespa/fastos/thread.h>
+
namespace ns_log {
uint64_t Timer::getTimestamp() const {
@@ -384,7 +375,7 @@ Logger::doEventProgress(const char *name, double value, double total)
void
Logger::doEventCount(const char *name, uint64_t value)
{
- doLog(event, "", 0, "count/1 name=\"%s\" value=%" PRIu64, name, value);
+ doLog(event, "", 0, "count/1 name=\"%s\" value=%lu", name, value);
}
void
@@ -396,7 +387,7 @@ Logger::doEventValue(const char *name, double value)
void
Logger::doEventCollection(uint64_t collectionId, const char* name, const char* params)
{
- doLog(event, "", 0, "collection/1 collectionId=%" PRIu64 " name=\"%s\" %s",
+ doLog(event, "", 0, "collection/1 collectionId=%lu name=\"%s\" %s",
collectionId, name, params);
}