summaryrefslogtreecommitdiffstats
path: root/vespalib
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2017-05-08 21:10:23 +0000
committerHenning Baldersheim <balder@yahoo-inc.com>2017-05-09 07:16:18 +0000
commit96bb31addf55a3a2903f1c34c4fb4dcffdf6fabe (patch)
tree8523012bde5707f3db3d5aa6efdc4a3ea86fe5c2 /vespalib
parent7cd93ed7b4059628da8193dec5ad627e3e1147d3 (diff)
Deinline as compiler makes the best choices.
Diffstat (limited to 'vespalib')
-rw-r--r--vespalib/src/vespa/vespalib/io/fileutil.cpp6
-rw-r--r--vespalib/src/vespa/vespalib/io/fileutil.h5
-rw-r--r--vespalib/src/vespa/vespalib/util/left_right_heap.h16
3 files changed, 15 insertions, 12 deletions
diff --git a/vespalib/src/vespa/vespalib/io/fileutil.cpp b/vespalib/src/vespa/vespalib/io/fileutil.cpp
index 2794a519800..c9778971efd 100644
--- a/vespalib/src/vespa/vespalib/io/fileutil.cpp
+++ b/vespalib/src/vespa/vespalib/io/fileutil.cpp
@@ -814,4 +814,10 @@ getOpenErrorString(const int osError, const stringref filename)
return os.str();
}
+bool
+isDirectory(const vespalib::stringref & path) {
+ FileInfo::UP info(stat(path));
+ return (info.get() && info->_directory);
+}
+
} // vespalib
diff --git a/vespalib/src/vespa/vespalib/io/fileutil.h b/vespalib/src/vespa/vespalib/io/fileutil.h
index 3984ec796c8..c6d1304c43a 100644
--- a/vespalib/src/vespa/vespalib/io/fileutil.h
+++ b/vespalib/src/vespa/vespalib/io/fileutil.h
@@ -358,10 +358,7 @@ extern inline bool isPlainFile(const vespalib::stringref & path) {
* @return True if it is a directory, false if it don't exist or isn't.
* @throw IoException If we failed to stat the file.
*/
-extern inline bool isDirectory(const vespalib::stringref & path) {
- FileInfo::UP info(stat(path));
- return (info.get() && info->_directory);
-}
+extern bool isDirectory(const vespalib::stringref & path);
/**
* Check whether a path is a symlink.
diff --git a/vespalib/src/vespa/vespalib/util/left_right_heap.h b/vespalib/src/vespa/vespalib/util/left_right_heap.h
index 94f5cc791ec..3bdd1511cc2 100644
--- a/vespalib/src/vespa/vespalib/util/left_right_heap.h
+++ b/vespalib/src/vespa/vespalib/util/left_right_heap.h
@@ -22,9 +22,9 @@ namespace vespalib {
struct LeftHeap {
static void require_left_heap() {} // for compile-time checks
template <typename T> static T &front(T *begin, T *) { return *begin; }
- template <typename T, typename C> inline static void push(T *begin, T *end, C cmp);
- template <typename T, typename C> inline static void pop(T *begin, T *end, C cmp);
- template <typename T, typename C> inline static void adjust(T *begin, T *end, C cmp);
+ template <typename T, typename C> static void push(T *begin, T *end, C cmp);
+ template <typename T, typename C> static void pop(T *begin, T *end, C cmp);
+ template <typename T, typename C> static void adjust(T *begin, T *end, C cmp);
};
/**
@@ -41,9 +41,9 @@ struct LeftHeap {
struct RightHeap {
static void require_right_heap() {} // for compile-time checks
template <typename T> static T &front(T *, T *end) { return *(end - 1); }
- template <typename T, typename C> inline static void push(T *begin, T *end, C cmp);
- template <typename T, typename C> inline static void pop(T *begin, T *end, C cmp);
- template <typename T, typename C> inline static void adjust(T *begin, T *end, C cmp);
+ template <typename T, typename C> static void push(T *begin, T *end, C cmp);
+ template <typename T, typename C> static void pop(T *begin, T *end, C cmp);
+ template <typename T, typename C> static void adjust(T *begin, T *end, C cmp);
};
/**
@@ -56,7 +56,7 @@ struct LeftArrayHeap {
template <typename T> static T &front(T *, T *end) { return *(end - 1); }
template <typename T, typename C> static void push(T *begin, T *end, C cmp);
template <typename T, typename C> static void pop(T *, T *, C) {}
- template <typename T, typename C> inline static void adjust(T *begin, T *end, C cmp) {
+ template <typename T, typename C> static void adjust(T *begin, T *end, C cmp) {
push(begin, end, cmp);
}
};
@@ -71,7 +71,7 @@ struct RightArrayHeap {
template <typename T> static T &front(T *begin, T *) { return *begin; }
template <typename T, typename C> static void push(T *begin, T *end, C cmp);
template <typename T, typename C> static void pop(T *, T *, C) {}
- template <typename T, typename C> inline static void adjust(T *begin, T *end, C cmp) {
+ template <typename T, typename C> static void adjust(T *begin, T *end, C cmp) {
push(begin, end, cmp);
}
};