aboutsummaryrefslogtreecommitdiff
path: root/src/libutil/util.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/libutil/util.hh')
-rw-r--r--src/libutil/util.hh13
1 files changed, 4 insertions, 9 deletions
diff --git a/src/libutil/util.hh b/src/libutil/util.hh
index a05a4cb88..f4026a0a8 100644
--- a/src/libutil/util.hh
+++ b/src/libutil/util.hh
@@ -150,8 +150,8 @@ void printMsg_(Verbosity level, const FormatOrString & fs);
#define printMsg(level, f) \
do { \
- if (level <= verbosity) { \
- printMsg_(level, (f)); \
+ if (level <= nix::verbosity) { \
+ nix::printMsg_(level, (f)); \
} \
} while (0)
@@ -199,9 +199,11 @@ class AutoDelete
bool del;
bool recursive;
public:
+ AutoDelete();
AutoDelete(const Path & p, bool recursive = true);
~AutoDelete();
void cancel();
+ void reset(const Path & p, bool recursive = true);
operator Path() const { return path; }
};
@@ -356,13 +358,6 @@ template<class N> bool string2Int(const string & s, N & n)
return str && str.get() == EOF;
}
-template<class N> string int2String(N n)
-{
- std::ostringstream str;
- str << n;
- return str.str();
-}
-
/* Return true iff `s' ends in `suffix'. */
bool hasSuffix(const string & s, const string & suffix);