Toward core module compiling.

This commit is contained in:
jmsgrogan 2023-12-27 12:20:02 +00:00
parent c25a56ee19
commit 3ed195d7dd
305 changed files with 1774 additions and 1065 deletions

View file

@ -78,31 +78,31 @@ public:
return m_open_for_write;
}
Result<std::size_t> do_read(VecBytes& bytes)
Result<size_t> do_read(VecBytes& bytes)
{
errno = 0;
const auto rc = ::read(m_fd, bytes.data(), bytes.capacity());
if (rc < 0)
{
const auto msg = _s("Error in read impl | ") + Error::from_errno();
return Result<std::size_t>(Error(msg));
return Result<size_t>(Error(msg));
}
return Result<std::size_t>(rc);
return Result<size_t>(rc);
}
Result<std::size_t> do_write(const VecBytes& bytes)
Result<size_t> do_write(const VecBytes& bytes)
{
errno = 0;
const auto rc = ::write(m_fd, bytes.data(), bytes.size());
if (rc < 0)
{
const auto msg = _s("Error in write impl | ") + Error::from_errno();
return Result<std::size_t>(Error(msg));
return Result<size_t>(Error(msg));
}
return Result<std::size_t>(rc);
return Result<size_t>(rc);
}
Result<std::size_t> do_write(const Vector<char>& bytes, int size = -1)
Result<size_t> do_write(const Vector<char>& bytes, int size = -1)
{
errno = 0;
int rc = 0;
@ -117,9 +117,9 @@ public:
if (rc < 0)
{
const auto msg = _s("Error in write impl | ") + Error::from_errno();
return Result<std::size_t>(Error(msg));
return Result<size_t>(Error(msg));
}
return Result<std::size_t>(rc);
return Result<size_t>(rc);
}
Status update_size()
@ -139,7 +139,7 @@ public:
bool m_open_for_write{false};
bool m_open_for_read{false};
bool m_valid{false};
std::size_t m_size{0};
size_t m_size{0};
bool m_is_open{false};
int m_fd{-1};
};