Skip to content

Commit 2e5c342

Browse files
committed
constify
Signed-off-by: Matt Benjamin <[email protected]>
1 parent 745b878 commit 2e5c342

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

bucket_cache.h

-1
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,6 @@ struct BucketCache : public Notifiable
372372
ev.name ? *ev.name : nil,
373373
uint32_t(ev.type))
374374
<< std::endl;
375-
/* TODO: add or remove entry */
376375
switch (ev.type)
377376
{
378377
case EventType::ADD:

notify.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@
88

99
namespace file::listing {
1010

11-
std::unique_ptr<Notify> Notify::factory(Notifiable* c, std::string& bucket_root)
11+
std::unique_ptr<Notify> Notify::factory(Notifiable* n, const std::string& bucket_root)
1212
{
1313
#ifdef linux
14-
return std::unique_ptr<Notify>(new Inotify(c, bucket_root));
14+
return std::unique_ptr<Notify>(new Inotify(n, bucket_root));
1515
#endif /* linux */
1616
return nullptr;
1717
} /* Notify::factory */

notify.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -61,13 +61,13 @@ namespace file::listing {
6161
Notifiable* n;
6262
sf::path rp;
6363

64-
Notify(Notifiable* n, std::string& bucket_root)
64+
Notify(Notifiable* n, const std::string& bucket_root)
6565
: n(n), rp(bucket_root)
6666
{}
6767

6868
friend class Inotify;
6969
public:
70-
static std::unique_ptr<Notify> factory(Notifiable* n, std::string& bucket_root);
70+
static std::unique_ptr<Notify> factory(Notifiable* n, const std::string& bucket_root);
7171

7272
virtual int add_watch(const std::string& dname, void* opaque) = 0;
7373
virtual int remove_watch(const std::string& dname) = 0;
@@ -195,7 +195,7 @@ namespace file::listing {
195195
}
196196
} /* ev_loop */
197197

198-
Inotify(Notifiable* n, std::string& bucket_root)
198+
Inotify(Notifiable* n, const std::string& bucket_root)
199199
: Notify(n, bucket_root),
200200
thrd(&Inotify::ev_loop, this)
201201
{

0 commit comments

Comments
 (0)