X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Fyoink;a=blobdiff_plain;f=src%2Fmoof%2Fresource.cc;h=95b4c698501a05686a02d1789a3f428298939cb1;hp=35cd663ded7decff86f96321916b8ab5cef71f5b;hb=d6990468d297a6cbee98e4d0d33ab37e1b2352c9;hpb=1d4aa0d34b0410c7bc60a24bad7abb55eacc850a diff --git a/src/moof/resource.cc b/src/moof/resource.cc index 35cd663..95b4c69 100644 --- a/src/moof/resource.cc +++ b/src/moof/resource.cc @@ -13,7 +13,7 @@ #include -#ifdef USE_HOTLOADING +#if ENABLE_HOTLOADING #include #include #endif @@ -112,7 +112,7 @@ static struct rsrc_list #endif } rsrc_list; -#ifdef USE_HOTLOADING +#if ENABLE_HOTLOADING static struct watch_list { // this table associates a watch descriptor with a loaded resource @@ -179,7 +179,7 @@ resource_ptr resource::load_with_path(const std::string& path, rsrc_list.table[path] = rsrc; rsrc->path_ = path; rsrc->type_ = ext; -#ifdef USE_HOTLOADING +#if ENABLE_HOTLOADING rsrc->wd_ = watch_list.add(rsrc); #endif return rsrc; @@ -197,7 +197,7 @@ int resource::reload_as_needed() { int count = 0; -#ifdef USE_HOTLOADING +#if ENABLE_HOTLOADING char bytes[BUF_SIZE]; int num_bytes; // an inotify file descriptor lets your read inotify_event structures @@ -255,7 +255,7 @@ void resource::reload() resource::~resource() { rsrc_list.table.erase(path_); -#ifdef USE_HOTLOADING +#if ENABLE_HOTLOADING watch_list.remove(wd_); #endif }