Skip to content

Commit

Permalink
compile
Browse files Browse the repository at this point in the history
  • Loading branch information
qicosmos committed Jul 4, 2024
1 parent 2c955e7 commit 64bb429
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions include/cinatra/ylt/coro_io/coro_file.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ class random_coro_file {
else {
#if defined(ENABLE_FILE_IO_URING) || defined(ASIO_WINDOWS)
auto [ec, read_size] = co_await coro_io::async_read_at(
offset, async_random_file_, asio::buffer(data, size));
offset, async_random_file_, asio::buffer(buf, size));

if (ec == asio::error::eof) {
eof_ = true;
Expand Down Expand Up @@ -428,7 +428,7 @@ class random_coro_file {

bool is_open() {
#if defined(ENABLE_FILE_IO_URING) || defined(ASIO_WINDOWS)
if (async_seq_file_.is_open()) {
if (async_random_file_.is_open()) {
return true;
}
#endif
Expand All @@ -439,7 +439,7 @@ class random_coro_file {

execution_type get_execution_type() {
#if defined(ENABLE_FILE_IO_URING) || defined(ASIO_WINDOWS)
if (async_seq_file_.is_open()) {
if (async_random_file_.is_open()) {
return execution_type::native_async;
}
#endif
Expand All @@ -453,7 +453,7 @@ class random_coro_file {
void close() {
#if defined(ENABLE_FILE_IO_URING) || defined(ASIO_WINDOWS)
std::error_code ec;
async_seq_file_.close(ec);
async_random_file_.close(ec);
#endif
prw_random_file_ = nullptr;
}
Expand Down

0 comments on commit 64bb429

Please sign in to comment.