Clean up uses of completion_t

This commit is contained in:
ridiculousfish
2012-02-01 16:27:14 -08:00
parent 0b4b6c498d
commit 62f49c55ce
10 changed files with 91 additions and 218 deletions

View File

@@ -22,7 +22,7 @@
#include <assert.h>
#include "util.h"
struct completion_t;
class completion_t;
/* Common string type */
typedef std::wstring wcstring;
@@ -298,6 +298,13 @@ T from_string(const wcstring &x) {
return result;
}
template<typename T>
wcstring to_string(const T &x) {
std::wstringstream stream;
stream << x;
return stream.str();
}
class scoped_lock {
pthread_mutex_t *lock_obj;
bool locked;