From 93363c4e1081af38ade51eaf4739dc220414ac9e Mon Sep 17 00:00:00 2001 From: monsta Date: Tue, 1 Mar 2016 17:43:35 +0300 Subject: remove some dead code --- src/util.h | 37 ------------------------------------- 1 file changed, 37 deletions(-) (limited to 'src') diff --git a/src/util.h b/src/util.h index 3d6ef47..38766f1 100644 --- a/src/util.h +++ b/src/util.h @@ -13,21 +13,6 @@ using std::string; -template -inline int procman_cmp(T x, T y) -{ - if (x == y) - return 0; - - if (x < y) - return -1; - - return 1; -} - -#define PROCMAN_CMP(X, Y) procman_cmp((X), (Y)) -#define PROCMAN_RCMP(X, Y) procman_cmp((Y), (X)); - /* check if logind is running */ #define LOGIND_RUNNING() (access("/run/systemd/seats/", F_OK) >= 0) @@ -61,28 +46,6 @@ inline string make_string(char *c_str) } - - -template -class UnrefMapValues - : public std::unary_function -{ -public: - void operator()(const typename Map::value_type &it) const - { - if (it.second) - g_object_unref(it.second); - } -}; - - -template -inline void unref_map_values(Map &map) -{ - std::for_each(map.begin(), map.end(), UnrefMapValues()); -} - - namespace procman { gchar* format_duration_for_display(unsigned centiseconds); -- cgit v1.2.1