Commit Graph

27 Commits

Author SHA1 Message Date
f2542f22fe Require C++14 (#2596)
This only has some minor additions of std::make_unique, digits
separators, std::string literals, and more flexible constexpr.
References #2469.
2025-05-18 12:34:53 +09:00
7cb46db945 Add missing string header (#2574)
Found via clang-tidy.
2024-10-25 16:13:57 +09:00
4845831f93 Convert some const to constexpr (#2342)
This guarantees that the function or value will resolve at compile-time.
2023-11-14 22:15:17 +09:00
5e5b4f0a49 Fixed ETag parsing at completing the Multipart upload part 2023-10-13 11:13:52 +09:00
fa3a472c6b Remove several calls to free (#2308) 2023-09-06 23:50:33 +09:00
48548f0896 Remove unused functions (#2289) 2023-08-22 23:17:43 +09:00
b2bb12fd2c Remove unneeded explicit std::string constructors (#2273)
std::string(const char*) implicitly constructs these.  The remaining call sites
requires string literals from C++14.
2023-08-17 22:12:28 +09:00
3790a0f8b4 Calculate MD5 without using a temporary file (#2252)
This mirrors the SHA256 code.
2023-08-07 00:17:15 +09:00
a4a2841c05 Use C++11 nullptr instead of 0 or NULL (#2234)
This improves type-safety.
2023-07-27 21:56:58 +09:00
f8a825e9b9 multipart upload id is converted by url encode (#2097) 2023-02-18 11:40:25 +09:00
48e9e51f4f Remove more unneeded headers identified by IWYU (#2011) 2022-07-30 12:06:47 +09:00
904682b856 Fix double-iteration in curl_slist_remove (#1951)
Also backfill tests.  Fixes #1948.
2022-05-27 22:56:20 +09:00
1678803566 Added S3fsCred class and moved Credential related processing in it 2022-02-13 21:38:30 +09:00
18e9c62087 Make string constants read-only const (#1733)
This removes some global constructors.  Also use a consistent ALL_CAPS
style.
2021-08-03 00:10:27 +09:00
a100be9dce Prefer std::string::empty over length == 0 (#1679)
This is more concise.
2021-06-13 20:03:10 +09:00
7638b5b3e3 Prefer std::string::rbegin over operator[] (#1673)
This is more concise and safer due to not repeating the variable name.
We cannot use std::string::back since it is not available in C++03.
2021-06-13 13:26:38 +09:00
600cee118d Fix implicit narrowing conversions (#1672)
These do not appear to be problematic but rather just clean up warnings.
Found via clang -Wshorten-64-to-32.
2021-06-13 12:50:07 +09:00
cb9148f6cd Update for clang-tidy 12 (#1644) 2021-05-03 09:43:18 +09:00
d019dda4f7 Simplify substr manipulations with erase (#1532)
This avoids creating a new std::string.
2021-01-25 18:02:32 +09:00
dc9255bc5f Prefer static_cast where possible (#1531) 2021-01-25 08:15:17 +09:00
bd0fadbe5f Remove authorization header when remaking handle (#1505)
This avoids including Authorization in SignedHeaders.  s3fs will
recreate the Authorization header before sending the request.
2021-01-04 21:37:34 +09:00
a16d00d673 Simply curl_slist_sort_insert (#1494)
Some good taste from Linus:
https://github.com/mkirchner/linked-list-good-taste
Also avoid an allocation when replacing a value and tighten up tests.
2020-12-23 20:29:33 +09:00
533322859d Added comment for nullPointerRedundantCheck/cppcheck2.2 2020-11-21 20:06:14 +09:00
503c86bb8a Call is_prefix instead of compare and substr 2020-09-27 22:19:54 +09:00
2438066d52 Remove calls to append, assign, and at
operator+, operator=, and operator[] are more idiomatic and consistent
with the code base.
2020-09-25 12:19:51 +09:00
1043e08dfa Remove uses of implicit namespace std
Fixed via:

sed -i '/using namespace std/{N;d}' src/*.cpp
sed -i 's/ string/ std::string/g' src/*.cpp
sed -i 's/(string/(std::string/g' src/*.cpp
sed -i 's/\[string/\[std::string/g' src/*.cpp
sed -i 's/^string/std::string/g' src/*.cpp
sed -i 's/ ifstream/ std::ifstream/g' src/*.cpp
sed -i 's/ istringstream/ std::istringstream/g' src/*.cpp
sed -i 's/ ostringstream/ std::ostringstream/g' src/*.cpp
sed -i 's/ max(/ std::max(/g' src/*.cpp
sed -i 's/ min(/ std::min(/g' src/*.cpp
sed -i 's/ endl/ std::endl/g' src/*.cpp
2020-09-13 11:57:20 +09:00
b5ffd419d8 Source file division and set 4 spaces and cleanup 2020-08-26 17:43:50 +09:00