diff --git a/encfs/base64.cpp b/encfs/base64.cpp index 37b6d6ca..c14ea956 100644 --- a/encfs/base64.cpp +++ b/encfs/base64.cpp @@ -252,7 +252,7 @@ bool B64StandardDecode(unsigned char *out, const unsigned char *in, int inLen) { // If you want to use an alternate alphabet, change the characters here const static char encodeLookup[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; -std::string B64StandardEncode(std::vector inputBuffer) { +std::string B64StandardEncode(const std::vector &inputBuffer) { std::string encodedString; encodedString.reserve(B256ToB64Bytes(inputBuffer.size())); long temp; diff --git a/encfs/base64.h b/encfs/base64.h index 796cfd6d..4ec5f2dd 100644 --- a/encfs/base64.h +++ b/encfs/base64.h @@ -73,7 +73,7 @@ void AsciiToB32(unsigned char *out, const unsigned char *in, int length); bool B64StandardDecode(unsigned char *out, const unsigned char *in, int inputLen); -std::string B64StandardEncode(std::vector input); +std::string B64StandardEncode(const std::vector &input); } // namespace encfs diff --git a/encfs/encfs.cpp b/encfs/encfs.cpp index 16c3ae6a..77d81b90 100644 --- a/encfs/encfs.cpp +++ b/encfs/encfs.cpp @@ -135,7 +135,7 @@ static void checkCanary(const std::shared_ptr &fnode) { // helper function -- apply a functor to a node static int withFileNode(const char *opName, const char *path, struct fuse_file_info *fi, - function op) { + const function &op) { EncFS_Context *ctx = context(); int res = -EIO;