From b47dd1e2203b3e57e4dd0b500cec7c78fd17c1cc Mon Sep 17 00:00:00 2001 From: Amar Takhar Date: Thu, 3 Feb 2011 15:49:13 +0000 Subject: [PATCH] Add mid() template to util namespace. Originally committed to SVN as r5278. --- aegisub/libaegisub/include/libaegisub/util.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/aegisub/libaegisub/include/libaegisub/util.h b/aegisub/libaegisub/include/libaegisub/util.h index ff0419f6c..fecc1c762 100644 --- a/aegisub/libaegisub/include/libaegisub/util.h +++ b/aegisub/libaegisub/include/libaegisub/util.h @@ -32,6 +32,8 @@ namespace agi { namespace util { + template inline T mid(T a, T b, T c) { return std::max(a, std::min(b, c)); } + const std::string DirName(const std::string& path); void Rename(const std::string& from, const std::string& to); void time_log(agi_timeval &tv);