From c22a9c340c6c7a403863c361d9dc68b526500c22 Mon Sep 17 00:00:00 2001 From: Isaac Joseph Date: Sun, 14 Apr 2024 19:36:49 -0700 Subject: [PATCH 1/4] Fix bool overload --- include/miniocpp/args.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/miniocpp/args.h b/include/miniocpp/args.h index 2010b56..8132771 100644 --- a/include/miniocpp/args.h +++ b/include/miniocpp/args.h @@ -570,7 +570,7 @@ struct PostPolicy { ~PostPolicy() = default; - explicit operator bool() const { return !bucket.empty() && !expiration_; } + explicit operator bool() const { return !bucket.empty() && (bool) expiration_; } error::Error AddEqualsCondition(std::string element, std::string value); error::Error RemoveEqualsCondition(std::string element); From d16e5a0e8189b581233ddcbe7648b45a54207603 Mon Sep 17 00:00:00 2001 From: Isaac Joseph Date: Sun, 14 Apr 2024 23:59:30 -0700 Subject: [PATCH 2/4] fix formatting --- include/miniocpp/args.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/include/miniocpp/args.h b/include/miniocpp/args.h index 8132771..a228b04 100644 --- a/include/miniocpp/args.h +++ b/include/miniocpp/args.h @@ -570,7 +570,9 @@ struct PostPolicy { ~PostPolicy() = default; - explicit operator bool() const { return !bucket.empty() && (bool) expiration_; } + explicit operator bool() const { + return !bucket.empty() && (bool)expiration_; + } error::Error AddEqualsCondition(std::string element, std::string value); error::Error RemoveEqualsCondition(std::string element); From 78bf545195f5271a3b6e576160b2b1666a3f46ff Mon Sep 17 00:00:00 2001 From: Isaac Joseph Date: Mon, 15 Apr 2024 13:31:39 -0700 Subject: [PATCH 3/4] Remove explicit cast Co-authored-by: Bala FA --- include/miniocpp/args.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/include/miniocpp/args.h b/include/miniocpp/args.h index a228b04..c2bb1fa 100644 --- a/include/miniocpp/args.h +++ b/include/miniocpp/args.h @@ -570,9 +570,7 @@ struct PostPolicy { ~PostPolicy() = default; - explicit operator bool() const { - return !bucket.empty() && (bool)expiration_; - } +explicit operator bool() const { return !bucket.empty() && expiration_; } error::Error AddEqualsCondition(std::string element, std::string value); error::Error RemoveEqualsCondition(std::string element); From 0ec17909425dd7798e29a543302f34d26f09f11d Mon Sep 17 00:00:00 2001 From: Bala FA Date: Tue, 16 Apr 2024 07:11:11 +0530 Subject: [PATCH 4/4] Update include/miniocpp/args.h --- include/miniocpp/args.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/miniocpp/args.h b/include/miniocpp/args.h index c2bb1fa..d1c4d12 100644 --- a/include/miniocpp/args.h +++ b/include/miniocpp/args.h @@ -570,7 +570,7 @@ struct PostPolicy { ~PostPolicy() = default; -explicit operator bool() const { return !bucket.empty() && expiration_; } + explicit operator bool() const { return !bucket.empty() && expiration_; } error::Error AddEqualsCondition(std::string element, std::string value); error::Error RemoveEqualsCondition(std::string element);