From ff626ac76357940b2f0ac5cb243a68ac13df0f8a Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sat, 19 Oct 2013 18:48:38 +0200 Subject: *: use references instead of pointers --- src/UpdateIO.cxx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/UpdateIO.cxx') diff --git a/src/UpdateIO.cxx b/src/UpdateIO.cxx index 14c25249f..1c3b7cc52 100644 --- a/src/UpdateIO.cxx +++ b/src/UpdateIO.cxx @@ -30,7 +30,7 @@ #include int -stat_directory(const Directory *directory, struct stat *st) +stat_directory(const Directory &directory, struct stat *st) { const auto path_fs = map_directory_fs(directory); if (path_fs.IsNull()) @@ -48,7 +48,7 @@ stat_directory(const Directory *directory, struct stat *st) } int -stat_directory_child(const Directory *parent, const char *name, +stat_directory_child(const Directory &parent, const char *name, struct stat *st) { const auto path_fs = map_directory_child_fs(parent, name); @@ -67,21 +67,21 @@ stat_directory_child(const Directory *parent, const char *name, } bool -directory_exists(const Directory *directory) +directory_exists(const Directory &directory) { const auto path_fs = map_directory_fs(directory); if (path_fs.IsNull()) /* invalid path: cannot exist */ return false; - return directory->device == DEVICE_INARCHIVE || - directory->device == DEVICE_CONTAINER + return directory.device == DEVICE_INARCHIVE || + directory.device == DEVICE_CONTAINER ? FileExists(path_fs) : DirectoryExists(path_fs); } bool -directory_child_is_regular(const Directory *directory, +directory_child_is_regular(const Directory &directory, const char *name_utf8) { const auto path_fs = map_directory_child_fs(directory, name_utf8); @@ -92,7 +92,7 @@ directory_child_is_regular(const Directory *directory, } bool -directory_child_access(const Directory *directory, +directory_child_access(const Directory &directory, const char *name, int mode) { #ifdef WIN32 -- cgit v1.2.3