Skip to content
Snippets Groups Projects
Commit ed0a69f5 authored by Florian Fischer's avatar Florian Fischer
Browse files

fixup! [IO] define methods and functions implemented in header files as inline

parent 27648ede
No related branches found
No related tags found
No related merge requests found
Pipeline #53909 passed
......@@ -92,8 +92,8 @@ inline auto send(int socket, const void *buffer, size_t length, int flags, bool
*
* @return -1 on error, otherwise the number of sent bytes
*/
inline auto send_and_wait(int socket, const void *buffer, size_t length, int flags, bool send_all = true)
-> ssize_t {
inline auto send_and_wait(int socket, const void *buffer, size_t length, int flags,
bool send_all = true) -> ssize_t {
IoContext *io = IoContext::getCurrentIo();
return io->send_and_wait(socket, buffer, length, flags, send_all);
}
......@@ -140,7 +140,8 @@ inline auto connect(int socket, const struct sockaddr *address, socklen_t addres
*
* @return -1 on error, 0 otherwise
*/
inline auto connect_and_wait(int socket, const struct sockaddr *address, socklen_t address_len) -> int {
inline auto connect_and_wait(int socket, const struct sockaddr *address, socklen_t address_len)
-> int {
IoContext *io = IoContext::getCurrentIo();
return io->connect_and_wait(socket, address, address_len);
}
......@@ -237,7 +238,7 @@ inline auto read_file(int fildes, void *buf, size_t nbyte, off_t offset = 0, boo
* @return -1 on error, otherwise the number of bytes read
*/
inline auto read_file_and_wait(int fildes, void *buf, size_t nbyte, off_t offset = 0,
bool read_all = false) -> ssize_t {
bool read_all = false) -> ssize_t {
IoContext *io = IoContext::getCurrentIo();
return io->read_file_and_wait(fildes, buf, nbyte, offset, read_all);
}
......@@ -260,8 +261,8 @@ inline auto read_file_and_wait(int fildes, void *buf, size_t nbyte, off_t offset
*
* @return Future object which signals the completion of the write request
*/
inline auto write_file(int fildes, const void *buf, size_t nbyte, off_t offset = 0, bool write_all = true)
-> std::unique_ptr<Future> {
inline auto write_file(int fildes, const void *buf, size_t nbyte, off_t offset = 0,
bool write_all = true) -> std::unique_ptr<Future> {
IoContext *io = IoContext::getCurrentIo();
return io->write_file(fildes, buf, nbyte, offset, write_all);
}
......@@ -285,7 +286,7 @@ inline auto write_file(int fildes, const void *buf, size_t nbyte, off_t offset =
* @return -1 on error, otherwise the number of bytes written
*/
inline auto write_file_and_wait(int fildes, const void *buf, size_t nbyte, off_t offset = 0,
bool write_all = false) -> ssize_t {
bool write_all = false) -> ssize_t {
IoContext *io = IoContext::getCurrentIo();
return io->write_file_and_wait(fildes, buf, nbyte, offset, write_all);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment