From bb15620bcf2c6dec409719f8be27c62696b692d8 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 23 Nov 2017 14:08:47 +0200 Subject: Make some functions static This works around an assertion in a modularized build with Clang. --- libbutl/filesystem.cxx | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) (limited to 'libbutl/filesystem.cxx') diff --git a/libbutl/filesystem.cxx b/libbutl/filesystem.cxx index da2f12c..fd9ba75 100644 --- a/libbutl/filesystem.cxx +++ b/libbutl/filesystem.cxx @@ -468,21 +468,21 @@ namespace butl // so use the second argument to not end up with the same signatures. // template - inline constexpr auto + static inline constexpr auto mnsec (const S* s, bool) -> decltype(s->st_mtim.tv_nsec) { return s->st_mtim.tv_nsec; // POSIX (GNU/Linux, Solaris). } template - inline constexpr auto + static inline constexpr auto mnsec (const S* s, int) -> decltype(s->st_mtimespec.tv_nsec) { return s->st_mtimespec.tv_nsec; // *BSD, MacOS. } template - inline constexpr auto + static inline constexpr auto mnsec (const S* s, float) -> decltype(s->st_mtime_n) { return s->st_mtime_n; // AIX 5.2 and later. @@ -492,32 +492,32 @@ namespace butl // let's make it a compile error. // // template - // inline constexpr int + // static inline constexpr int // mnsec (...) {return 0;} template - inline constexpr auto + static inline constexpr auto ansec (const S* s, bool) -> decltype(s->st_atim.tv_nsec) { return s->st_atim.tv_nsec; // POSIX (GNU/Linux, Solaris). } template - inline constexpr auto + static inline constexpr auto ansec (const S* s, int) -> decltype(s->st_atimespec.tv_nsec) { return s->st_atimespec.tv_nsec; // *BSD, MacOS. } template - inline constexpr auto + static inline constexpr auto ansec (const S* s, float) -> decltype(s->st_atime_n) { return s->st_atime_n; // AIX 5.2 and later. } // template - // inline constexpr int + // static inline constexpr int // ansec (...) {return 0;} void @@ -813,7 +813,8 @@ namespace butl } template - inline /*constexpr*/ entry_type d_type (const D* d, decltype(d->d_type)*) + static inline /*constexpr*/ entry_type + d_type (const D* d, decltype(d->d_type)*) { switch (d->d_type) { @@ -845,7 +846,8 @@ namespace butl } template - inline constexpr entry_type d_type (...) {return entry_type::unknown;} + static inline constexpr entry_type + d_type (...) {return entry_type::unknown;} void dir_iterator:: next () -- cgit v1.1