diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2016-12-17 11:59:55 +0000 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2016-12-19 14:15:41 +0000 |
commit | 817991c5182f896273cde10534ddd4376ee2d8d2 (patch) | |
tree | 5bf7b6b46b8686e6b188b88f0ff12f5a1d043a70 /vespalib | |
parent | df7414c6ba44bea9a381e88d2989fe86f7bc44c6 (diff) |
Do not include fastos.h in header files.
Diffstat (limited to 'vespalib')
-rw-r--r-- | vespalib/src/vespa/vespalib/geo/zcurve.h | 45 | ||||
-rw-r--r-- | vespalib/src/vespa/vespalib/stllike/asciistream.h | 5 | ||||
-rw-r--r-- | vespalib/src/vespa/vespalib/util/guard.h | 2 | ||||
-rw-r--r-- | vespalib/src/vespa/vespalib/util/stringfmt.h | 7 |
4 files changed, 18 insertions, 41 deletions
diff --git a/vespalib/src/vespa/vespalib/geo/zcurve.h b/vespalib/src/vespa/vespalib/geo/zcurve.h index 8986cdd35ba..750b635b2d3 100644 --- a/vespalib/src/vespa/vespalib/geo/zcurve.h +++ b/vespalib/src/vespa/vespalib/geo/zcurve.h @@ -1,15 +1,10 @@ // Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -/** - * @file zcurve.h - * @author Tor Egge - * - * $Id$ - */ #pragma once -#include <vespa/fastos/fastos.h> +#include <cstdint> #include <cassert> +#include <vector> namespace vespalib { namespace geo { @@ -34,38 +29,14 @@ public: int64_t _zMaxy; /* Max Y coordinate, interleaved (Z curve) */ public: - BoundingBox(int32_t minx, - int32_t maxx, - int32_t miny, - int32_t maxy); - - ~BoundingBox(void) - { - } + BoundingBox(int32_t minx, int32_t maxx, int32_t miny, int32_t maxy); - int64_t - getzMinx(void) const - { - return _zMinx; - } + ~BoundingBox() { } - int64_t - getzMaxx(void) const - { - return _zMaxx; - } - - int64_t - getzMiny(void) const - { - return _zMiny; - } - - int64_t - getzMaxy(void) const - { - return _zMaxy; - } + int64_t getzMinx() const { return _zMinx; } + int64_t getzMaxx() const { return _zMaxx; } + int64_t getzMiny() const { return _zMiny; } + int64_t getzMaxy() const { return _zMaxy; } /** * Returns true if the given z-encoded xy coordinate is diff --git a/vespalib/src/vespa/vespalib/stllike/asciistream.h b/vespalib/src/vespa/vespalib/stllike/asciistream.h index 4c414cc314f..64d1cbb7fcc 100644 --- a/vespalib/src/vespa/vespalib/stllike/asciistream.h +++ b/vespalib/src/vespa/vespalib/stllike/asciistream.h @@ -1,9 +1,8 @@ // Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once -#include <vespa/fastos/fastos.h> -#include <string> #include <vespa/vespalib/stllike/string.h> +#include <vector> namespace vespalib { @@ -40,7 +39,7 @@ public: asciistream & operator << (bool v) { if (v) { *this << '1'; } else { *this << '0'; } return *this; } asciistream & operator << (char v) { doFill(1); write(&v, 1); return *this; } asciistream & operator << (unsigned char v) { doFill(1); write(&v, 1); return *this; } - asciistream & operator << (const char * v) { if (v != NULL) { size_t n(strlen(v)); doFill(n); write(v, n); } return *this; } + asciistream & operator << (const char * v) { if (v != nullptr) { size_t n(strlen(v)); doFill(n); write(v, n); } return *this; } asciistream & operator << (const string & v) { doFill(v.size()); write(v.c_str(), v.size()); return *this; } asciistream & operator << (const stringref & v) { doFill(v.size()); write(v.c_str(), v.size()); return *this; } asciistream & operator << (const std::string & v) { doFill(v.size()); write(v.c_str(), v.size()); return *this; } diff --git a/vespalib/src/vespa/vespalib/util/guard.h b/vespalib/src/vespa/vespalib/util/guard.h index be78e785b3d..bda60b03d68 100644 --- a/vespalib/src/vespa/vespalib/util/guard.h +++ b/vespalib/src/vespa/vespalib/util/guard.h @@ -4,6 +4,8 @@ #pragma once #include <stdio.h> +#include <dirent.h> +#include <unistd.h> namespace vespalib { diff --git a/vespalib/src/vespa/vespalib/util/stringfmt.h b/vespalib/src/vespa/vespalib/util/stringfmt.h index a8db9c93877..d71c809596c 100644 --- a/vespalib/src/vespa/vespalib/util/stringfmt.h +++ b/vespalib/src/vespa/vespalib/util/stringfmt.h @@ -1,9 +1,14 @@ // Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once -#include <stdarg.h> +#include <cstdarg> #include <vespa/vespalib/stllike/string.h> +#ifndef PRId64 + #define PRId64 "ld" + #define PRIu64 "lu" +#endif + namespace vespalib { extern vespalib::string make_string_va(const char *fmt, va_list ap); |