Remove unused function: cwd()

This commit is contained in:
Thiago Marcos P. Santos
2015-07-10 18:10:04 +03:00
parent 30416c5a98
commit d207166abe
2 changed files with 0 additions and 21 deletions

View File

@@ -12,8 +12,6 @@ typedef struct uv_fs_s uv_fs_t;
namespace uv {
std::string cwd();
class rwlock;
class loop;
class async;

View File

@@ -48,25 +48,6 @@ void uv_key_set(uv_key_t* key, void* value) {
namespace uv {
std::string cwd() {
#if UV_VERSION_MAJOR == 0 && UV_VERSION_MINOR <= 10
char dir[512];
uv_cwd(dir, 512);
return dir;
#else
size_t max = 0;
std::string dir;
do {
max += 256;
dir.resize(max);
uv_cwd(const_cast<char *>(dir.data()), &max);
} while (max == dir.size());
dir.resize(max - 1);
return dir;
#endif
}
lock::lock(mutex &mtx_) : mtx(&mtx_) {
if (mtx) { mtx->lock(); }
}