From 9662290600dd0a9fac3626ca07da0cb8c40e62b0 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Wed, 21 Aug 2013 00:57:17 +0000 Subject: Pass std::strings to functions instead of const char *, for C++ style. --- lib/backupstore/BackupClientFileAttributes.h | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'lib/backupstore/BackupClientFileAttributes.h') diff --git a/lib/backupstore/BackupClientFileAttributes.h b/lib/backupstore/BackupClientFileAttributes.h index 8ae7ffc2..662529ec 100644 --- a/lib/backupstore/BackupClientFileAttributes.h +++ b/lib/backupstore/BackupClientFileAttributes.h @@ -43,10 +43,10 @@ public: // Prevent access to base class members accidently void Set(); - void ReadAttributes(const char *Filename, bool ZeroModificationTimes = false, + void ReadAttributes(const std::string& Filename, bool ZeroModificationTimes = false, box_time_t *pModTime = 0, box_time_t *pAttrModTime = 0, int64_t *pFileSize = 0, InodeRefType *pInodeNumber = 0, bool *pHasMultipleLinks = 0); - void WriteAttributes(const char *Filename, + void WriteAttributes(const std::string& Filename, bool MakeUserWritable = false) const; void GetModificationTimes(box_time_t *pModificationTime, box_time_t *pAttrModificationTime) const; @@ -56,15 +56,18 @@ public: static void SetBlowfishKey(const void *pKey, int KeyLength); static void SetAttributeHashSecret(const void *pSecret, int SecretLength); - static uint64_t GenerateAttributeHash(EMU_STRUCT_STAT &st, const std::string &filename, const std::string &leafname); - static void FillExtendedAttr(StreamableMemBlock &outputBlock, const char *Filename); + static uint64_t GenerateAttributeHash(EMU_STRUCT_STAT &st, + const std::string& Filename, const std::string &leafname); + static void FillExtendedAttr(StreamableMemBlock &outputBlock, + const std::string& Filename); private: static void FillAttributes(StreamableMemBlock &outputBlock, - const char *Filename, const EMU_STRUCT_STAT &st, + const std::string& Filename, const EMU_STRUCT_STAT &st, bool ZeroModificationTimes); - static void FillAttributesLink(StreamableMemBlock &outputBlock, const char *Filename, struct stat &st); - void WriteExtendedAttr(const char *Filename, int xattrOffset) const; + static void FillAttributesLink(StreamableMemBlock &outputBlock, + const std::string& Filename, struct stat &st); + void WriteExtendedAttr(const std::string& Filename, int xattrOffset) const; void RemoveClear() const; void EnsureClearAvailable() const; -- cgit v1.2.3