diff options
author | Kevin Ottens <kevin.ottens@nextcloud.com> | 2020-12-10 21:52:58 +0300 |
---|---|---|
committer | Kevin Ottens <kevin.ottens@nextcloud.com> | 2020-12-15 13:01:53 +0300 |
commit | c57eff6fd80b1685237f1e782ed1c640c2350a9f (patch) | |
tree | 1845a1e5ca665b09add42fab6151030fad960600 /src/csync | |
parent | c03a5da6709a57c0456ca9d83158fe839ab7a3c1 (diff) |
Please the clang-tidy overlord
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
Diffstat (limited to 'src/csync')
-rw-r--r-- | src/csync/csync_exclude.h | 2 | ||||
-rw-r--r-- | src/csync/std/c_lib.h | 4 | ||||
-rw-r--r-- | src/csync/std/c_private.h | 10 | ||||
-rw-r--r-- | src/csync/vio/csync_vio_local_unix.cpp | 2 |
4 files changed, 9 insertions, 9 deletions
diff --git a/src/csync/csync_exclude.h b/src/csync/csync_exclude.h index 7d41a3326..bbb0a2cda 100644 --- a/src/csync/csync_exclude.h +++ b/src/csync/csync_exclude.h @@ -66,7 +66,7 @@ class OCSYNC_EXPORT ExcludedFiles : public QObject { Q_OBJECT public: - typedef std::tuple<int, int, int> Version; + using Version = std::tuple<int, int, int>; explicit ExcludedFiles(const QString &localPath = QStringLiteral("/")); ~ExcludedFiles(); diff --git a/src/csync/std/c_lib.h b/src/csync/std/c_lib.h index 13b9f1587..84f1004b2 100644 --- a/src/csync/std/c_lib.h +++ b/src/csync/std/c_lib.h @@ -18,7 +18,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include <stdlib.h> // NOLINT this is sometimes compiled in C mode -#include <string.h> // NOLINT this is sometimes compiled in C mode +#include <cstdlib> +#include <cstring> #include "c_private.h" diff --git a/src/csync/std/c_private.h b/src/csync/std/c_private.h index bfad3b1b9..aaa41417f 100644 --- a/src/csync/std/c_private.h +++ b/src/csync/std/c_private.h @@ -39,7 +39,7 @@ #include <unistd.h> #endif -#include <errno.h> // NOLINT this is sometimes compiled in C mode +#include <cerrno> #ifdef __MINGW32__ #ifndef S_IRGRP @@ -74,10 +74,10 @@ #ifdef _WIN32 -typedef struct stat64 csync_stat_t; // NOLINT this is sometimes compiled in C mode +using csync_stat_t = struct stat64; #define _FILE_OFFSET_BITS 64 #else -typedef struct stat csync_stat_t; // NOLINT this is sometimes compiled in C mode +using csync_stat_t = struct stat; #endif #ifndef O_NOATIME @@ -94,7 +94,7 @@ typedef struct stat csync_stat_t; // NOLINT this is sometimes compiled in C mode #endif #if defined _WIN32 && defined _UNICODE -typedef wchar_t mbchar_t; // NOLINT this is sometimes compiled in C mode +using mbchar_t = wchar_t; #define _topen _wopen #define _tdirent _wdirent #define _topendir _wopendir @@ -115,7 +115,7 @@ typedef wchar_t mbchar_t; // NOLINT this is sometimes compiled in C mod #define _tchdir _wchdir #define _tgetcwd _wgetcwd #else -typedef char mbchar_t; // NOLINT this is sometimes compiled in C mode +using mbchar_t = char; #define _tdirent dirent #define _topen open #define _topendir opendir diff --git a/src/csync/vio/csync_vio_local_unix.cpp b/src/csync/vio/csync_vio_local_unix.cpp index 5ebec53a8..1f41f42f1 100644 --- a/src/csync/vio/csync_vio_local_unix.cpp +++ b/src/csync/vio/csync_vio_local_unix.cpp @@ -74,7 +74,7 @@ int csync_vio_local_closedir(csync_vio_handle_t *dhandle) { std::unique_ptr<csync_file_stat_t> csync_vio_local_readdir(csync_vio_handle_t *handle, OCC::Vfs *vfs) { - struct _tdirent *dirent = NULL; + struct _tdirent *dirent = nullptr; std::unique_ptr<csync_file_stat_t> file_stat; do { |