Add mid() template to util namespace.

Originally committed to SVN as r5278.
This commit is contained in:
Amar Takhar 2011-02-03 15:49:13 +00:00
parent bb4aa727d3
commit b47dd1e220
1 changed files with 2 additions and 0 deletions

View File

@ -32,6 +32,8 @@
namespace agi { namespace agi {
namespace util { namespace util {
template<typename T> 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); const std::string DirName(const std::string& path);
void Rename(const std::string& from, const std::string& to); void Rename(const std::string& from, const std::string& to);
void time_log(agi_timeval &tv); void time_log(agi_timeval &tv);