语法问题修复

This commit is contained in:
shell committed 2026-08-02 21:31:46 +08:00
1 parent 45060f03b6
commit ff5917ffbd
3 files changed
+9 -11

No files matched your search

+3 -2
View File
@@ -65,7 +65,7 @@ namespace seafile::fs
[[nodiscard]] tl::expected<api::AccountInfo, api::SeafileException> accountInfo() const;
/// 同步用户信息
[[nodiscard]] tl::expected<void, api::SeafileException> syncUserInfo();
[[nodiscard]] tl::expected<void, api::SeafileException> syncUserInfo() const;
/// 同步repo信息
[[nodiscard]] tl::expected<std::vector<storage::RepoInfo>, api::SeafileException> syncRepos();
@@ -76,6 +76,7 @@ namespace seafile::fs
static std::filesystem::path storePath();
/// 获取路径信息
/// @param repo_id repo id
/// @param path 路径
/// @return 路径信息
tl::expected<storage::RepoEntry, api::SeafileException> findRepoEntry(
@@ -85,7 +86,7 @@ namespace seafile::fs
tl::expected<storage::RepoInfo, api::SeafileException> findRepoByName(const std::string& name);
tl::expected<void, api::SeafileException> fetchAndStoreRepoDir(
const std::string& repo_id, const std::string& parent_path);
const std::string& repo_id, const std::string& parent_path) const;
std::vector<storage::RepoEntry> queryDirectoryChildren(
const std::string& repo_id, const std::string& parent_path);
+4 -5
View File
@@ -4,22 +4,21 @@
#ifndef SEADISK_UNITS_HPP
#define SEADISK_UNITS_HPP
#include <cstddef>
namespace seafile::literals {
constexpr std::size_t operator"" _B(unsigned long long v) {
constexpr std::size_t operator ""_B(unsigned long long v) {
return v;
}
constexpr std::size_t operator"" _KB(unsigned long long v) {
constexpr std::size_t operator ""_KB(unsigned long long v) {
return v * 1024ULL;
}
constexpr std::size_t operator"" _MB(unsigned long long v) {
constexpr std::size_t operator ""_MB(unsigned long long v) {
return v * 1024ULL * 1024ULL;
}
constexpr std::size_t operator"" _GB(unsigned long long v) {
constexpr std::size_t operator ""_GB(unsigned long long v) {
return v * 1024ULL * 1024ULL * 1024ULL;
}
}