Commit Graph

96 Commits

Author SHA1 Message Date
37e593aeb0 Changed file stat times(a/c/mtime) management 2025-10-03 13:59:41 +09:00
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
cc29bea81b Call std::get_time instead of strptime (#2598)
This reduces the Windows-specific code.
2024-11-09 19:28:40 +09:00
45b32046cd Consolidate lower and upper logic (#2594) 2024-11-06 00:07:12 +09:00
b87a8400e3 Use pass-by-value for peeloff (#2578)
This avoids copies when used with std::move.
2024-10-29 18:21:07 +09:00
7cb46db945 Add missing string header (#2574)
Found via clang-tidy.
2024-10-25 16:13:57 +09:00
fe82477a6b Add missing utility header for std::move (#2572)
Found via clang-tidy.
2024-10-25 14:55:01 +09:00
cc5271ef2b Enable clang-tidy narrowing conversions (#2564) 2024-10-22 19:55:10 +09:00
141d74f187 Use auto for iterator variable types (#2554)
This touches a few other long type names.  Applied via clang-tidy
-fix.
2024-10-18 21:57:52 +09:00
254d717a4a Address clang-tidy 19 warnings (#2474) 2024-06-23 12:21:51 +09:00
86e6bdaf4d Apply clang-tidy to headers (#2470) 2024-06-23 11:49:59 +09:00
54aa278df0 Fixed errors reported by cppcheck 2.13.0 (#2400) 2024-01-25 00:46:45 +09:00
f041812939 Revert "Call C++11 get_time and put_time (#2375)" (#2381)
This reverts commit 10a72bfd0f.  These
commit is incompatible with older CentOS 7 libstdc++.
2023-11-27 00:51:17 +09:00
10a72bfd0f Call C++11 get_time and put_time (#2375)
This removes workarounds and fixed-length buffers.
2023-11-20 18:45:27 +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
e5b15bed7d Pass by value to trim functions (#2345)
These already force a copy so passing by value has the same
performance but is simpler.  But this allows the compiler to perform
copy elision on temporaries and the caller to explicitly std::move in
others.
2023-10-12 22:21:33 +09:00
50f6c38c84 Replace xattr_value with std::string (#2280) 2023-08-19 11:12:43 +09:00
528a61718d Convert manual memory allocations to std::unique_ptr (#2253) 2023-08-11 23:26:07 +09:00
c568a69452 Return std::string from base64 encoding function (#2248)
This is avoids manual memory allocations.
2023-08-06 22:22:02 +09:00
1f04165a33 Convert most str callers to C++11 std::to_string (#2238)
Remaining ones handle timespec.
2023-07-28 18:21:55 +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
faec0d9d15 Refixed for cppcheck 2.1x 2023-07-26 07:55:33 +09:00
9c74014443 Fixed a bug in handling file names containing CR(0x1D) (#2136) 2023-03-26 13:19:16 +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
01a92476e6 Remove unneeded headers identified by IWYU (#2007) 2022-07-28 23:38:38 +09:00
4b2f3fecb5 Set mtime/ctime/atime of all objects as nanosecond 2022-07-28 13:47:03 +09:00
581f5c0356 Move strptime polyfill to string_util 2022-01-23 21:49:51 +09:00
b14e39815b Use polyfills in MSYS2 environment 2022-01-23 21:49:51 +09:00
48817d849f Require explicit length in s3fs_decode64 (#1755)
This is available from std::string::size in callers.
2021-08-31 09:22:10 +09:00
cd98afdd7b Do not NUL terminate base64 decoded output (#1752)
This is binary data and must use the explicit length.
2021-08-31 00:15:47 +09:00
dac6885fb0 Don't over-allocate in base64 encoding and decoding (#1751) 2021-08-30 00:03:10 +09:00
66006ba48d Add dedicated upper- and lower-case hex functions (#1734)
This makes the call sites more readable than a boolean parameter.
2021-08-04 07:28:51 +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
2154e898bc Fix typos (#1700) 2021-06-27 11:22:33 +09:00
bb6d2b1b74 Replace snprintf with string and ostringstream (#1649)
These uses are probably safe from a buffer overflow perspective but
can cause data race issues in logging due to static buffers.
2021-05-08 02:48:47 +09:00
8ef01d37a9 Fix a few nits (#1645)
Make some strings more const, initialize members, and abort if lock
initialization fails.  Partially found via clang-tidy.
2021-05-06 19:40:35 +09:00
cb9148f6cd Update for clang-tidy 12 (#1644) 2021-05-03 09:43:18 +09:00
7f3e423bbe Preserve sub-second time precision (#1624)
Found via pjdfstests.  References #897.  References #1589.
2021-04-18 13:11:12 +09:00
d019dda4f7 Simplify substr manipulations with erase (#1532)
This avoids creating a new std::string.
2021-01-25 18:02:32 +09:00
493cf20f95 Merge pull request #1435 from gaul/no-exceptions
Remove exceptions from s3fs_strtoofft
2020-10-04 22:19:25 +09:00
133feb67c3 Merge pull request #1434 from gaul/const-string
Use const std::string& where possible
2020-10-03 10:02:03 +09:00
2cf195741c Fixed signature error due to case of hex string 2020-10-02 18:09:13 +00:00
3628b9d1e2 Remove exceptions from s3fs_strtoofft
Explicit return codes are simpler and safer.
2020-10-02 22:53:12 +09:00
8d2bd874d7 Use const std::string& where possible
This hints to callers on usage.
2020-10-02 08:48:43 +09:00
7e27c6cf7d Further simplify and centralize hex conversion 2020-10-01 23:31:06 +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