This commit is contained in:
@ -75,21 +75,21 @@ private:
|
||||
|
||||
void put_client(std::shared_ptr<client> &cli);
|
||||
|
||||
[[nodiscard]] auto read_packet(client &cli, packet &response)
|
||||
-> packet::error_type;
|
||||
[[nodiscard]] auto read_packet(client &cli,
|
||||
packet &response) -> packet::error_type;
|
||||
|
||||
void resolve();
|
||||
|
||||
public:
|
||||
[[nodiscard]] auto send(const std::string &method,
|
||||
[[nodiscard]] auto send(std::string_view method,
|
||||
std::uint32_t &service_flags) -> packet::error_type;
|
||||
|
||||
[[nodiscard]] auto send(const std::string &method, packet &request,
|
||||
[[nodiscard]] auto send(std::string_view method, packet &request,
|
||||
std::uint32_t &service_flags) -> packet::error_type;
|
||||
|
||||
[[nodiscard]] auto send(const std::string &method, packet &request,
|
||||
packet &response, std::uint32_t &service_flags)
|
||||
-> packet::error_type;
|
||||
[[nodiscard]] auto send(std::string_view method, packet &request,
|
||||
packet &response,
|
||||
std::uint32_t &service_flags) -> packet::error_type;
|
||||
};
|
||||
} // namespace repertory
|
||||
|
||||
|
@ -174,7 +174,7 @@ private:
|
||||
mutable std::int32_t res_;
|
||||
|
||||
private:
|
||||
void set_res(std::int32_t res, std::string function) const {
|
||||
void set_res(std::int32_t res, std::string_view function) const {
|
||||
if (res != SQLITE_OK && res != SQLITE_DONE && res != SQLITE_ROW) {
|
||||
utils::error::raise_error(function, "failed to step|" +
|
||||
std::to_string(res) + '|' +
|
||||
@ -194,8 +194,8 @@ public:
|
||||
return sqlite3_errstr(res_);
|
||||
}
|
||||
|
||||
[[nodiscard]] auto get_row(std::optional<db_row<context_t>> &row) const
|
||||
-> bool {
|
||||
[[nodiscard]] auto
|
||||
get_row(std::optional<db_row<context_t>> &row) const -> bool {
|
||||
constexpr const auto *function_name =
|
||||
static_cast<const char *>(__FUNCTION__);
|
||||
|
||||
|
@ -65,25 +65,26 @@ private:
|
||||
|
||||
private:
|
||||
[[nodiscard]] auto execute_callback(
|
||||
const std::string &function_name, const char *from, const char *to,
|
||||
std::string_view function_name, const char *from, const char *to,
|
||||
const std::function<api_error(const std::string &, const std::string &)>
|
||||
&cb,
|
||||
bool disable_logging = false) -> int;
|
||||
|
||||
[[nodiscard]] auto
|
||||
execute_callback(const std::string &function_name, const char *path,
|
||||
execute_callback(std::string_view function_name, const char *path,
|
||||
const std::function<api_error(const std::string &)> &cb,
|
||||
bool disable_logging = false) -> int;
|
||||
|
||||
static void execute_void_callback(const std::string &function_name,
|
||||
static void execute_void_callback(std::string_view function_name,
|
||||
const std::function<void()> &cb);
|
||||
|
||||
static auto
|
||||
execute_void_pointer_callback(const std::string &function_name,
|
||||
execute_void_pointer_callback(std::string_view function_name,
|
||||
const std::function<void *()> &cb) -> void *;
|
||||
|
||||
void raise_fuse_event(std::string function_name, const std::string &api_path,
|
||||
int ret, bool disable_logging);
|
||||
void raise_fuse_event(std::string_view function_name,
|
||||
const std::string &api_path, int ret,
|
||||
bool disable_logging);
|
||||
|
||||
private:
|
||||
[[nodiscard]] static auto access_(const char *path, int mask) -> int;
|
||||
|
Reference in New Issue
Block a user