From 62d506c24aaf543f84c82e2850a05b1387e4990d Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sat, 9 Jan 2021 13:58:38 +0000 Subject: Clang format --- service/uptr.h | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) (limited to 'service/uptr.h') diff --git a/service/uptr.h b/service/uptr.h index 17eb28d..e73e098 100644 --- a/service/uptr.h +++ b/service/uptr.h @@ -1,24 +1,22 @@ #ifndef MIRRORSEARCH_UPTR_H #define MIRRORSEARCH_UPTR_H -#include #include +#include #include namespace MirrorSearch { typedef std::function OnError; - std::string - failingFunction(void * const func); + std::string failingFunction(void * const func); - void - defaultErrorHandler(const std::string &); + void defaultErrorHandler(const std::string &); - template using UPtr = std::unique_ptr; + template using UPtr = std::unique_ptr; - template + template R * - make_unique(R * (*func)(P...), OnError onError, A ... p) + make_unique(R * (*func)(P...), OnError onError, A... p) { if (auto obj = func(p...)) { return obj; @@ -27,13 +25,12 @@ namespace MirrorSearch { throw std::runtime_error("Error handler did not throw"); } - template + template UPtr - make_unique(R*(*get)(P...), void(*release)(R*), OnError onError, A ... p) + make_unique(R * (*get)(P...), void (*release)(R *), OnError onError, A... p) { - return std::unique_ptr(make_unique(get, onError, p...), release); + return std::unique_ptr(make_unique(get, onError, p...), release); } } #endif - -- cgit v1.2.3