Replace C-style casts with C++ ones

This commit is contained in:
Eugene Shalygin 2017-05-29 14:10:31 +02:00
parent e3671050d1
commit 74cecb1b6c
20 changed files with 41 additions and 39 deletions

View file

@ -224,7 +224,9 @@ bool FileSystemWatcher::isNetworkFileSystem(QString path)
// XXX: should we make sure HAVE_STRUCT_FSSTAT_F_FSTYPENAME is defined?
return ((strcmp(buf.f_fstypename, "nfs") == 0) || (strcmp(buf.f_fstypename, "cifs") == 0) || (strcmp(buf.f_fstypename, "smbfs") == 0));
#else
return ((buf.f_type == (long)CIFS_MAGIC_NUMBER) || (buf.f_type == (long)NFS_SUPER_MAGIC) || (buf.f_type == (long)SMB_SUPER_MAGIC));
return ((buf.f_type == static_cast<long>(CIFS_MAGIC_NUMBER))
|| (buf.f_type == static_cast<long>(NFS_SUPER_MAGIC))
|| (buf.f_type == static_cast<long>(SMB_SUPER_MAGIC)));
#endif
}
else {