From 2cc529aa1fc82211dfa4f90a6e24ad2607d6817a Mon Sep 17 00:00:00 2001 From: Henning Baldersheim Date: Wed, 31 May 2017 23:07:25 +0200 Subject: Reduce fastos.h dependency. --- searchlib/src/vespa/searchlib/aggregation/fs4hit.cpp | 1 - searchlib/src/vespa/searchlib/aggregation/hit.cpp | 1 - searchlib/src/vespa/searchlib/aggregation/rawrank.cpp | 1 - searchlib/src/vespa/searchlib/attribute/attribute.cpp | 3 --- searchlib/src/vespa/searchlib/attribute/attributefactory.cpp | 5 ++--- searchlib/src/vespa/searchlib/attribute/attributefile.cpp | 11 ++++------- .../vespa/searchlib/attribute/attributefilebufferwriter.cpp | 4 +--- .../vespa/searchlib/attribute/attributefilesavetarget.cpp | 12 +++++------- .../searchlib/attribute/attributememoryfilebufferwriter.cpp | 5 +---- .../vespa/searchlib/attribute/attributememoryfilewriter.cpp | 7 ++----- .../vespa/searchlib/attribute/attributememorysavetarget.cpp | 7 +------ searchlib/src/vespa/searchlib/attribute/attributesaver.cpp | 5 +---- searchlib/src/vespa/searchlib/attribute/configconverter.cpp | 3 --- searchlib/src/vespa/searchlib/attribute/defines.cpp | 3 --- searchlib/src/vespa/searchlib/attribute/dociditerator.cpp | 3 --- searchlib/src/vespa/searchlib/attribute/enumattribute.cpp | 3 --- 16 files changed, 17 insertions(+), 57 deletions(-) diff --git a/searchlib/src/vespa/searchlib/aggregation/fs4hit.cpp b/searchlib/src/vespa/searchlib/aggregation/fs4hit.cpp index f63f44d3a12..aac21a0ae66 100644 --- a/searchlib/src/vespa/searchlib/aggregation/fs4hit.cpp +++ b/searchlib/src/vespa/searchlib/aggregation/fs4hit.cpp @@ -1,5 +1,4 @@ // Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -#include #include "fs4hit.h" #include diff --git a/searchlib/src/vespa/searchlib/aggregation/hit.cpp b/searchlib/src/vespa/searchlib/aggregation/hit.cpp index 9bb7cf95757..501249cf867 100644 --- a/searchlib/src/vespa/searchlib/aggregation/hit.cpp +++ b/searchlib/src/vespa/searchlib/aggregation/hit.cpp @@ -1,5 +1,4 @@ // Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -#include #include "hit.h" #include diff --git a/searchlib/src/vespa/searchlib/aggregation/rawrank.cpp b/searchlib/src/vespa/searchlib/aggregation/rawrank.cpp index b570c7795c0..7674cde1de7 100644 --- a/searchlib/src/vespa/searchlib/aggregation/rawrank.cpp +++ b/searchlib/src/vespa/searchlib/aggregation/rawrank.cpp @@ -1,5 +1,4 @@ // Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -#include #include "rawrank.h" #include #include diff --git a/searchlib/src/vespa/searchlib/attribute/attribute.cpp b/searchlib/src/vespa/searchlib/attribute/attribute.cpp index 649ac1c9786..e0a47db521f 100644 --- a/searchlib/src/vespa/searchlib/attribute/attribute.cpp +++ b/searchlib/src/vespa/searchlib/attribute/attribute.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 #include "attribute.h" -#include -LOG_SETUP(".searchlib.attribute.attribute"); namespace search { } // namespace search diff --git a/searchlib/src/vespa/searchlib/attribute/attributefactory.cpp b/searchlib/src/vespa/searchlib/attribute/attributefactory.cpp index f7d5adbe049..e80fd2ab8c0 100644 --- a/searchlib/src/vespa/searchlib/attribute/attributefactory.cpp +++ b/searchlib/src/vespa/searchlib/attribute/attributefactory.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 +#include "attributefactory.h" + #include LOG_SETUP(".searchlib.attributefactory"); -#include "attributefactory.h" - namespace search { using attribute::CollectionType; diff --git a/searchlib/src/vespa/searchlib/attribute/attributefile.cpp b/searchlib/src/vespa/searchlib/attribute/attributefile.cpp index a2f12ad3a1d..8394fc36fb6 100644 --- a/searchlib/src/vespa/searchlib/attribute/attributefile.cpp +++ b/searchlib/src/vespa/searchlib/attribute/attributefile.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 #include "attributefile.h" -#include +#include #include #include #include -#include +#include #include LOG_SETUP(".attributefile"); @@ -15,13 +14,11 @@ using vespalib::IllegalStateException; using search::common::FileHeaderContext; using vespalib::getLastErrorString; -namespace search -{ +namespace search { using attribute::BasicType; -namespace -{ +namespace { void updateHeader(const vespalib::string &name) diff --git a/searchlib/src/vespa/searchlib/attribute/attributefilebufferwriter.cpp b/searchlib/src/vespa/searchlib/attribute/attributefilebufferwriter.cpp index 15eceae889d..561993c7bce 100644 --- a/searchlib/src/vespa/searchlib/attribute/attributefilebufferwriter.cpp +++ b/searchlib/src/vespa/searchlib/attribute/attributefilebufferwriter.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 #include "attributefilebufferwriter.h" -namespace search -{ +namespace search { AttributeFileBufferWriter:: AttributeFileBufferWriter(IAttributeFileWriter &fileWriter) diff --git a/searchlib/src/vespa/searchlib/attribute/attributefilesavetarget.cpp b/searchlib/src/vespa/searchlib/attribute/attributefilesavetarget.cpp index ce77c3b8722..291f265c484 100644 --- a/searchlib/src/vespa/searchlib/attribute/attributefilesavetarget.cpp +++ b/searchlib/src/vespa/searchlib/attribute/attributefilesavetarget.cpp @@ -1,20 +1,18 @@ // Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -#include -#include -LOG_SETUP(".searchlib.attribute.attributefilesavetarget"); - #include "attributefilesavetarget.h" #include "attributevector.h" +#include #include #include -#include #include +#include +LOG_SETUP(".searchlib.attribute.attributefilesavetarget"); + using vespalib::getLastErrorString; -namespace search -{ +namespace search { using common::FileHeaderContext; diff --git a/searchlib/src/vespa/searchlib/attribute/attributememoryfilebufferwriter.cpp b/searchlib/src/vespa/searchlib/attribute/attributememoryfilebufferwriter.cpp index 534a7d6ff2f..833171328a6 100644 --- a/searchlib/src/vespa/searchlib/attribute/attributememoryfilebufferwriter.cpp +++ b/searchlib/src/vespa/searchlib/attribute/attributememoryfilebufferwriter.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 #include "attributememoryfilebufferwriter.h" -namespace search -{ - +namespace search { AttributeMemoryFileBufferWriter:: AttributeMemoryFileBufferWriter(IAttributeFileWriter &memoryFileWriter) diff --git a/searchlib/src/vespa/searchlib/attribute/attributememoryfilewriter.cpp b/searchlib/src/vespa/searchlib/attribute/attributememoryfilewriter.cpp index a9b72350c7e..b536cdae0b9 100644 --- a/searchlib/src/vespa/searchlib/attribute/attributememoryfilewriter.cpp +++ b/searchlib/src/vespa/searchlib/attribute/attributememoryfilewriter.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 #include "attributememoryfilewriter.h" #include "attributememoryfilebufferwriter.h" -namespace search -{ +namespace search { -namespace -{ +namespace { const uint32_t MIN_ALIGNMENT = 4096; diff --git a/searchlib/src/vespa/searchlib/attribute/attributememorysavetarget.cpp b/searchlib/src/vespa/searchlib/attribute/attributememorysavetarget.cpp index 41166c8b76b..e93e2ee34db 100644 --- a/searchlib/src/vespa/searchlib/attribute/attributememorysavetarget.cpp +++ b/searchlib/src/vespa/searchlib/attribute/attributememorysavetarget.cpp @@ -1,15 +1,10 @@ // Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -#include -#include -LOG_SETUP(".searchlib.attribute.attributememorysavetarget"); - #include "attributememorysavetarget.h" #include "attributefilesavetarget.h" #include "attributevector.h" -namespace search -{ +namespace search { using search::common::FileHeaderContext; diff --git a/searchlib/src/vespa/searchlib/attribute/attributesaver.cpp b/searchlib/src/vespa/searchlib/attribute/attributesaver.cpp index f00a14127aa..f03fecce67c 100644 --- a/searchlib/src/vespa/searchlib/attribute/attributesaver.cpp +++ b/searchlib/src/vespa/searchlib/attribute/attributesaver.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 #include "attributesaver.h" #include "iattributesavetarget.h" - using vespalib::GenerationHandler; -namespace search -{ +namespace search { AttributeSaver::AttributeSaver(GenerationHandler::Guard &&guard, const attribute::AttributeHeader &header) diff --git a/searchlib/src/vespa/searchlib/attribute/configconverter.cpp b/searchlib/src/vespa/searchlib/attribute/configconverter.cpp index 9e3c6156dbf..63c964c3bf9 100644 --- a/searchlib/src/vespa/searchlib/attribute/configconverter.cpp +++ b/searchlib/src/vespa/searchlib/attribute/configconverter.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. -#include -#include -LOG_SETUP(".searchlib.attribute.configconverter"); #include "configconverter.h" using namespace vespa::config::search; diff --git a/searchlib/src/vespa/searchlib/attribute/defines.cpp b/searchlib/src/vespa/searchlib/attribute/defines.cpp index cbe69920ac3..9af6da89662 100644 --- a/searchlib/src/vespa/searchlib/attribute/defines.cpp +++ b/searchlib/src/vespa/searchlib/attribute/defines.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 #include "defines.h" -#include -LOG_SETUP(".searchlib.attribute.defines"); namespace search { } // namespace search diff --git a/searchlib/src/vespa/searchlib/attribute/dociditerator.cpp b/searchlib/src/vespa/searchlib/attribute/dociditerator.cpp index f7429070f34..400676cece6 100644 --- a/searchlib/src/vespa/searchlib/attribute/dociditerator.cpp +++ b/searchlib/src/vespa/searchlib/attribute/dociditerator.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 #include "dociditerator.h" -#include -LOG_SETUP(".searchlib.attribute.dociditerator"); namespace search { } // namespace search diff --git a/searchlib/src/vespa/searchlib/attribute/enumattribute.cpp b/searchlib/src/vespa/searchlib/attribute/enumattribute.cpp index 396c50eba65..34f2c63eb00 100644 --- a/searchlib/src/vespa/searchlib/attribute/enumattribute.cpp +++ b/searchlib/src/vespa/searchlib/attribute/enumattribute.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 #include "enumattribute.h" #include "enumattribute.hpp" -#include -LOG_SETUP(".searchlib.attribute.enumattribute"); namespace search { } // namespace search -- cgit v1.2.3