Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rework entire code for correctness and potential bug fixes #111

Merged
merged 83 commits into from
Mar 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
83 commits
Select commit Hold shift + click to select a range
74d2b90
Switched the cast to bool operators to explicit mode. The implicit on…
piotr-topnotch Feb 27, 2024
3bcde85
Implicit bool cast bug: added relational operators to Time
piotr-topnotch Feb 27, 2024
bcbe506
Implicit bool cast bug: error string building
piotr-topnotch Feb 27, 2024
7128abd
Added explicit casts. Some code needs further inspection, as it makes…
piotr-topnotch Feb 27, 2024
3138280
Implicit bool cast bug: added error streaming operator
piotr-topnotch Feb 27, 2024
dd299ee
Improved const-correctness, defaulted the constructor and destructor
piotr-topnotch Feb 27, 2024
0be9be6
Const correctness and copy elimination
piotr-topnotch Feb 27, 2024
3d9e915
Improved const-correctness, defaulted the constructor and destructor,…
piotr-topnotch Feb 27, 2024
f2a16f6
Improved const-correctness, defaulted the constructor and destructor
piotr-topnotch Feb 27, 2024
2509218
Improved const-correctness, defaulted the constructors and destructor…
piotr-topnotch Feb 27, 2024
a70501e
De-inlining of complex functions
piotr-topnotch Feb 27, 2024
79df2b9
Const correctness + copy elision
piotr-topnotch Feb 27, 2024
66b1854
Improved const-correctness, defaulted the constructors and destructors
piotr-topnotch Feb 27, 2024
bc27b78
COnst-correctness and copy elision
piotr-topnotch Feb 28, 2024
3ca5099
Const-correctness, copy elision, defaulting constructors and destructors
piotr-topnotch Feb 28, 2024
d4b1788
Const-correctness, copy elision, defaulting constructors and destructors
piotr-topnotch Feb 28, 2024
de743cf
De-inlined complex functions
piotr-topnotch Feb 28, 2024
af4d582
De-inlined complex functions
piotr-topnotch Feb 28, 2024
c57b7d2
De-inlined complex functions, cleaned up includes
piotr-topnotch Feb 28, 2024
5eb57f0
De-inlined complex functions, added <<() to Time
piotr-topnotch Feb 28, 2024
cae79d1
De-inlined complex functions
piotr-topnotch Feb 28, 2024
48d4f08
Bugfix: provided a default value
piotr-topnotch Feb 28, 2024
408cc5e
De-inlined complex functions, defaulted constructors and destructors,…
piotr-topnotch Feb 28, 2024
474dbd4
De-inlined complex functions, defaulted constructors and destructors,…
piotr-topnotch Feb 28, 2024
efa2c24
ebasing nullptr
piotr-topnotch Feb 28, 2024
33de57f
Inlined the << operator
piotr-topnotch Feb 28, 2024
792ba02
Conditionally enabled the spaceship operator
piotr-topnotch Feb 28, 2024
7f4f724
Implemented the basic version of Time::Compare
piotr-topnotch Feb 28, 2024
0515f1c
Enabled -Wall; follow-up fixes batch #1
piotr-topnotch Feb 28, 2024
ada8c43
Enabled -Wall; follow-up fixes batch #2
piotr-topnotch Feb 29, 2024
20fe111
Const correctness, copy elision
piotr-topnotch Feb 29, 2024
ae8367d
Const reinforcement
piotr-topnotch Feb 29, 2024
40cb39a
Defaulted constructors and destructors, const correctness
piotr-topnotch Feb 29, 2024
1aaeff8
Added explicit move construction support
piotr-topnotch Feb 29, 2024
61ca42c
Const hardening, copy elision
piotr-topnotch Feb 29, 2024
ab7269b
Copy elision
piotr-topnotch Feb 29, 2024
65cf438
De-inlined complex functions, defaulted constructors and destructors,…
piotr-topnotch Feb 29, 2024
289f7ea
Initialization improvements, defaulted destructors
piotr-topnotch Feb 29, 2024
90adac3
Initialization improvements
piotr-topnotch Feb 29, 2024
6561239
Restored Windows compatibility
piotr-topnotch Feb 29, 2024
935037d
rvalue references are not needed for arithmetic types
piotr-topnotch Feb 29, 2024
d980246
The default copy constructor is fine
piotr-topnotch Feb 29, 2024
2c83f9a
Added -Wall -Wextra
piotr-topnotch Feb 29, 2024
11efff0
Added default initializaters, as they are skipped at the call sites
piotr-topnotch Feb 29, 2024
d390957
Unused parameter
piotr-topnotch Feb 29, 2024
8703679
Added default initializaters, as they are skipped at the call sites
piotr-topnotch Feb 29, 2024
47f96c7
De-inlined virtual functions, defaulted constructors and destructors
piotr-topnotch Feb 29, 2024
137bef3
Added default initializaters, as they are skipped at the call sites
piotr-topnotch Feb 29, 2024
d7d8b7e
ebasingization improvements, defaulted destructors
piotr-topnotch Feb 29, 2024
27b4215
-Wextra fixes
piotr-topnotch Mar 1, 2024
24e4a55
-Wconversion fixes
piotr-topnotch Mar 1, 2024
1e041c7
Bugfix: broken copy construction
piotr-topnotch Mar 4, 2024
568c1e4
Switched to default copy constructor and assignment operator
piotr-topnotch Mar 4, 2024
9c42c5e
Assignment optimization
piotr-topnotch Mar 4, 2024
e05c022
Bugfix: ToLower
piotr-topnotch Mar 4, 2024
e60bce1
Removed a couple of PWTODOs
piotr-topnotch Mar 5, 2024
4ca7777
ebasingfixes
piotr-topnotch Mar 6, 2024
1847979
Replaced h with result_headers, fixed the ifs lacking braces
piotr-topnotch Mar 6, 2024
78dec1f
Linter
piotr-topnotch Mar 6, 2024
4f8d571
Namet member initialization is a C++20 feature
piotr-topnotch Mar 6, 2024
369ab9c
Removed a class of resolved comments
piotr-topnotch Mar 11, 2024
fbbe516
Removed a class of resolved comments #2
piotr-topnotch Mar 11, 2024
e010dd6
Bugfix: resp is always false in the else branch
piotr-topnotch Mar 11, 2024
0426d95
Windows warning fixes, part #1
piotr-topnotch Mar 11, 2024
2b07aa1
Fixed MSVC warnings
piotr-topnotch Mar 12, 2024
297cac8
Fixed MSVC warnings
piotr-topnotch Mar 12, 2024
9e21211
Fixed MSVC warnings
piotr-topnotch Mar 12, 2024
9bcc55f
Fixed MSVC warnings
piotr-topnotch Mar 12, 2024
00ccc61
Muted the Windows headers-related warnings
piotr-topnotch Mar 12, 2024
68fbea4
Bugfix: narrowing conversion
piotr-topnotch Mar 12, 2024
f7cb294
throw() is deprecated
piotr-topnotch Mar 13, 2024
e4643bb
function-try-block make sure no exception passes unnoticed
piotr-topnotch Mar 13, 2024
4eb531d
Use throw; for rethrowing exceptions
piotr-topnotch Mar 13, 2024
eaf0100
Linter
piotr-topnotch Mar 13, 2024
72408e0
Linter
piotr-topnotch Mar 13, 2024
f884e97
Linter
piotr-topnotch Mar 13, 2024
f1201e7
Resolved the Time::operator << issue
piotr-topnotch Mar 14, 2024
3545753
Resolved the UTC flag issue: Bala wants to remove it
piotr-topnotch Mar 14, 2024
8707407
Removed the PWTODO comments
piotr-topnotch Mar 14, 2024
7833183
Linter
piotr-topnotch Mar 14, 2024
8cf60ad
Replaced main() with args with just main(), as it is a legal C++ sign…
piotr-topnotch Mar 15, 2024
a24226c
Aligned the return types
piotr-topnotch Mar 15, 2024
b884f0c
Linter
piotr-topnotch Mar 15, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ ENDIF (${CMAKE_BINARY_DIR} STREQUAL ${CMAKE_SOURCE_DIR})
SET(requiredlibs)

IF(CMAKE_COMPILER_IS_GNUCC)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror -Wall -Wextra -Wconversion")
IF(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 8.0 AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 9.0 AND NOT MINGW)
list(APPEND requiredlibs stdc++fs)
ENDIF()
Expand Down
2 changes: 1 addition & 1 deletion examples/BucketExists.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

#include "client.h"

int main(int argc, char* argv[]) {
int main() {
// Create S3 base URL.
minio::s3::BaseUrl base_url("play.min.io");

Expand Down
2 changes: 1 addition & 1 deletion examples/ComposeObject.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

#include "client.h"

int main(int argc, char* argv[]) {
int main() {
// Create S3 base URL.
minio::s3::BaseUrl base_url("play.min.io");

Expand Down
2 changes: 1 addition & 1 deletion examples/CopyObject.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

#include "client.h"

int main(int argc, char* argv[]) {
int main() {
// Create S3 base URL.
minio::s3::BaseUrl base_url("play.min.io");

Expand Down
2 changes: 1 addition & 1 deletion examples/DeleteBucketEncryption.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

#include "client.h"

int main(int argc, char* argv[]) {
int main() {
// Create S3 base URL.
minio::s3::BaseUrl base_url("play.min.io");

Expand Down
2 changes: 1 addition & 1 deletion examples/DeleteBucketLifecycle.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

#include "client.h"

int main(int argc, char* argv[]) {
int main() {
// Create S3 base URL.
minio::s3::BaseUrl base_url("play.min.io");

Expand Down
2 changes: 1 addition & 1 deletion examples/DeleteBucketNotification.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

#include "client.h"

int main(int argc, char* argv[]) {
int main() {
// Create S3 base URL.
minio::s3::BaseUrl base_url("play.min.io");

Expand Down
2 changes: 1 addition & 1 deletion examples/DeleteBucketPolicy.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

#include "client.h"

int main(int argc, char* argv[]) {
int main() {
// Create S3 base URL.
minio::s3::BaseUrl base_url("play.min.io");

Expand Down
2 changes: 1 addition & 1 deletion examples/DeleteBucketReplication.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

#include "client.h"

int main(int argc, char* argv[]) {
int main() {
// Create S3 base URL.
minio::s3::BaseUrl base_url("play.min.io");

Expand Down
2 changes: 1 addition & 1 deletion examples/DeleteBucketTags.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

#include "client.h"

int main(int argc, char* argv[]) {
int main() {
// Create S3 base URL.
minio::s3::BaseUrl base_url("play.min.io");

Expand Down
2 changes: 1 addition & 1 deletion examples/DeleteObjectLockConfig.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

#include "client.h"

int main(int argc, char* argv[]) {
int main() {
// Create S3 base URL.
minio::s3::BaseUrl base_url("play.min.io");

Expand Down
2 changes: 1 addition & 1 deletion examples/DeleteObjectTags.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

#include "client.h"

int main(int argc, char* argv[]) {
int main() {
// Create S3 base URL.
minio::s3::BaseUrl base_url("play.min.io");

Expand Down
2 changes: 1 addition & 1 deletion examples/DisableObjectLegalHold.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

#include "client.h"

int main(int argc, char* argv[]) {
int main() {
// Create S3 base URL.
minio::s3::BaseUrl base_url("play.min.io");

Expand Down
2 changes: 1 addition & 1 deletion examples/DownloadObject.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

#include "client.h"

int main(int argc, char* argv[]) {
int main() {
// Create S3 base URL.
minio::s3::BaseUrl base_url("play.min.io");

Expand Down
2 changes: 1 addition & 1 deletion examples/EnableObjectLegalHold.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

#include "client.h"

int main(int argc, char* argv[]) {
int main() {
// Create S3 base URL.
minio::s3::BaseUrl base_url("play.min.io");

Expand Down
2 changes: 1 addition & 1 deletion examples/GetBucketEncryption.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

#include "client.h"

int main(int argc, char* argv[]) {
int main() {
// Create S3 base URL.
minio::s3::BaseUrl base_url("play.min.io");

Expand Down
2 changes: 1 addition & 1 deletion examples/GetBucketLifecycle.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

#include "client.h"

int main(int argc, char* argv[]) {
int main() {
// Create S3 base URL.
minio::s3::BaseUrl base_url("play.min.io");

Expand Down
2 changes: 1 addition & 1 deletion examples/GetBucketNotification.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

#include "client.h"

int main(int argc, char* argv[]) {
int main() {
// Create S3 base URL.
minio::s3::BaseUrl base_url("play.min.io");

Expand Down
2 changes: 1 addition & 1 deletion examples/GetBucketPolicy.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

#include "client.h"

int main(int argc, char* argv[]) {
int main() {
// Create S3 base URL.
minio::s3::BaseUrl base_url("play.min.io");

Expand Down
2 changes: 1 addition & 1 deletion examples/GetBucketReplication.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

#include "client.h"

int main(int argc, char* argv[]) {
int main() {
// Create S3 base URL.
minio::s3::BaseUrl base_url("play.min.io");

Expand Down
2 changes: 1 addition & 1 deletion examples/GetBucketTags.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

#include "client.h"

int main(int argc, char* argv[]) {
int main() {
// Create S3 base URL.
minio::s3::BaseUrl base_url("play.min.io");

Expand Down
2 changes: 1 addition & 1 deletion examples/GetBucketVersioning.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

#include "client.h"

int main(int argc, char* argv[]) {
int main() {
// Create S3 base URL.
minio::s3::BaseUrl base_url("play.min.io");

Expand Down
2 changes: 1 addition & 1 deletion examples/GetObject.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

#include "client.h"

int main(int argc, char* argv[]) {
int main() {
// Create S3 base URL.
minio::s3::BaseUrl base_url("play.min.io");

Expand Down
2 changes: 1 addition & 1 deletion examples/GetObjectLockConfig.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

#include "client.h"

int main(int argc, char* argv[]) {
int main() {
// Create S3 base URL.
minio::s3::BaseUrl base_url("play.min.io");

Expand Down
2 changes: 1 addition & 1 deletion examples/GetObjectProgress.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

#include "client.h"

int main(int argc, char* argv[]) {
int main() {
// Create S3 base URL.
minio::s3::BaseUrl base_url("play.min.io");

Expand Down
2 changes: 1 addition & 1 deletion examples/GetObjectRetention.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

#include "client.h"

int main(int argc, char* argv[]) {
int main() {
// Create S3 base URL.
minio::s3::BaseUrl base_url("play.min.io");

Expand Down
2 changes: 1 addition & 1 deletion examples/GetObjectTags.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

#include "client.h"

int main(int argc, char* argv[]) {
int main() {
// Create S3 base URL.
minio::s3::BaseUrl base_url("play.min.io");

Expand Down
2 changes: 1 addition & 1 deletion examples/GetPresignedObjectUrl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

#include "client.h"

int main(int argc, char* argv[]) {
int main() {
// Create S3 base URL.
minio::s3::BaseUrl base_url("play.min.io");

Expand Down
2 changes: 1 addition & 1 deletion examples/GetPresignedPostFormData.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

#include "client.h"

int main(int argc, char* argv[]) {
int main() {
// Create S3 base URL.
minio::s3::BaseUrl base_url("play.min.io");

Expand Down
2 changes: 1 addition & 1 deletion examples/IsObjectLegalHoldEnabled.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

#include "client.h"

int main(int argc, char* argv[]) {
int main() {
// Create S3 base URL.
minio::s3::BaseUrl base_url("play.min.io");

Expand Down
2 changes: 1 addition & 1 deletion examples/ListBuckets.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

#include "client.h"

int main(int argc, char* argv[]) {
int main() {
// Create S3 base URL.
minio::s3::BaseUrl base_url("play.min.io");

Expand Down
2 changes: 1 addition & 1 deletion examples/ListObjects.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

#include "client.h"

int main(int argc, char* argv[]) {
int main() {
// Create S3 base URL.
minio::s3::BaseUrl base_url("play.min.io");

Expand Down
2 changes: 1 addition & 1 deletion examples/ListenBucketNotification.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

#include "client.h"

int main(int argc, char* argv[]) {
int main() {
// Create S3 base URL.
minio::s3::BaseUrl base_url("play.min.io");

Expand Down
2 changes: 1 addition & 1 deletion examples/MakeBucket.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

#include "client.h"

int main(int argc, char* argv[]) {
int main() {
// Create S3 base URL.
minio::s3::BaseUrl base_url("play.min.io");

Expand Down
2 changes: 1 addition & 1 deletion examples/PutObject.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

#include "client.h"

int main(int argc, char* argv[]) {
int main() {
// Create S3 base URL.
minio::s3::BaseUrl base_url("play.min.io");

Expand Down
2 changes: 1 addition & 1 deletion examples/PutObjectProgress.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

#include "client.h"

int main(int argc, char* argv[]) {
int main() {
// Create S3 base URL.
minio::s3::BaseUrl base_url("play.min.io");

Expand Down
2 changes: 1 addition & 1 deletion examples/RemoveBucket.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

#include "client.h"

int main(int argc, char* argv[]) {
int main() {
// Create S3 base URL.
minio::s3::BaseUrl base_url("play.min.io");

Expand Down
2 changes: 1 addition & 1 deletion examples/RemoveObject.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

#include "client.h"

int main(int argc, char* argv[]) {
int main() {
// Create S3 base URL.
minio::s3::BaseUrl base_url("play.min.io");

Expand Down
2 changes: 1 addition & 1 deletion examples/RemoveObjects.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

#include "client.h"

int main(int argc, char* argv[]) {
int main() {
// Create S3 base URL.
minio::s3::BaseUrl base_url("play.min.io");

Expand Down
2 changes: 1 addition & 1 deletion examples/SelectObjectContent.cc
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#include "client.h"
#include "select.h"

int main(int argc, char* argv[]) {
int main() {
// Create S3 base URL.
minio::s3::BaseUrl base_url("play.min.io");

Expand Down
2 changes: 1 addition & 1 deletion examples/SetBucketEncryption.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

#include "client.h"

int main(int argc, char* argv[]) {
int main() {
// Create S3 base URL.
minio::s3::BaseUrl base_url("play.min.io");

Expand Down
2 changes: 1 addition & 1 deletion examples/SetBucketLifecycle.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

#include "client.h"

int main(int argc, char* argv[]) {
int main() {
// Create S3 base URL.
minio::s3::BaseUrl base_url("play.min.io");

Expand Down
2 changes: 1 addition & 1 deletion examples/SetBucketNotification.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

#include "client.h"

int main(int argc, char* argv[]) {
int main() {
// Create S3 base URL.
minio::s3::BaseUrl base_url("play.min.io");

Expand Down
2 changes: 1 addition & 1 deletion examples/SetBucketPolicy.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

#include "client.h"

int main(int argc, char* argv[]) {
int main() {
// Create S3 base URL.
minio::s3::BaseUrl base_url("play.min.io");

Expand Down
Loading
Loading