Commit Graph

34 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
d4f3fb01fc Make some methods const (#2614)
Found via cppcheck --inconclusive.
2024-12-01 10:31:03 +09:00
7cb46db945 Add missing string header (#2574)
Found via clang-tidy.
2024-10-25 16:13:57 +09:00
31061416bc Separate serialization and deserialization code (#2566)
This is clearer than a bool parameter.
2024-10-24 08:22:35 +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
86b353511a Replace memset with C++11 value initialization (#2471)
This generates the same code but is safer due to using an implicit
length and allowing member initialization.
2024-06-24 00:24:49 +09:00
fa807a56fb Fix typos (#2473) 2024-06-23 15:33:46 +09:00
254d717a4a Address clang-tidy 19 warnings (#2474) 2024-06-23 12:21:51 +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
c5a75a1fb2 Delete copy constructors and assignment operators (#2257)
One of these was buggy and others had the wrong parameters and return
types.
2023-08-11 13:12:03 +09:00
b29f8d0f2b Use C++ enum class for most enums (#2241)
This promotes type-safety.
2023-07-30 22:53:17 +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
6344d74ae3 Replace some raw pointers with std::unique_ptr (#2195)
This simplifies code paths and makes memory leaks less likely.  It
also makes memory ownership more explicit by requiring std::move.
This commit requires C++11.  References #2179.
2023-07-27 09:12:28 +09:00
faec0d9d15 Refixed for cppcheck 2.1x 2023-07-26 07:55:33 +09:00
cb3dc28e6e Supported cppcheck 2.10(and changed std from c++03 to c++11 for RHEL7) 2023-07-25 08:08:06 +09:00
a25cb9e07a Fixed a bug when reading a reduced file without flushing (#2133) 2023-03-26 11:45:21 +09:00
4f22354aae Fix an error to calculate no data page bytes (#2122)
Co-authored-by: Takeshi Nakatani <ggtakec@gmail.com>
2023-03-11 17:23:56 +09:00
9a4282208e Improved fdcache_page performance 2022-09-25 17:14:35 +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
d842d45b2b Fixed a bug about truncation for shrinking file 2022-03-02 22:41:10 +09:00
023aaf7dff Fixed wrong stat of cache after new creation file
And added a test for stat of cache after new creation file
2021-10-17 16:10:14 +09:00
2f412804e2 Fixed forgetting to clear the dirty flag for meta information
Addressed an error in macos cpp check
2021-10-15 22:54:55 +09:00
199b3d4709 Fixed a bug in disk free space calculation 2021-07-18 14:52:11 +09:00
2154e898bc Fix typos (#1700) 2021-06-27 11:22:33 +09:00
6edf3d6427 Updated to clearly output message about the file descriptor type(pseudo/physical) 2021-06-25 19:18:08 +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
42f5965d8a Fix off_t to int narrowing in PageList::GetSparseFilePages (#1654)
Found via clang-tidy.
2021-05-09 14:35:00 +09:00
b0e8758b63 Use result instead of res for consistency (#1530) 2021-01-25 07:56:10 +09:00
d9f6469b7b Fixed flushing dirty data and compressed the cache size 2020-11-14 16:45:37 +09:00
6aa786b886 Flush dirty data after a writing a number of bytes (#1448)
This allows s3fs to write large files without consuming a large amount
of temporary local storage but can slow uploads due to server-side
copies.  References #617.  Fixed #1056.  Fixes #1257.
2020-10-13 22:30:42 +09:00
3553fb65a0 Suppress false positive from Coverity 2020-10-04 14:58:13 +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