Skip to content

Commit 0a6b8d5

Browse files
author
Xin Wang (from Dev Box)
committed
format code
1 parent aa4a24b commit 0a6b8d5

2 files changed

Lines changed: 16 additions & 4 deletions

File tree

src/linux/init/localhost.cpp

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,14 @@ struct RelayDirection
4545
bool srcEof;
4646
bool done;
4747

48-
size_t Pending() const { return tail - head; }
49-
size_t Available() const { return buf.size() - tail; }
48+
size_t Pending() const
49+
{
50+
return tail - head;
51+
}
52+
size_t Available() const
53+
{
54+
return buf.size() - tail;
55+
}
5056

5157
void Compact()
5258
{

src/windows/common/relay.cpp

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,14 @@ struct RelayDirection
7777
bool Done = false;
7878
bool DstIsSocket = false;
7979

80-
size_t Pending() const { return Tail - Head; }
81-
size_t Available() const { return Buffer.size() - Tail; }
80+
size_t Pending() const
81+
{
82+
return Tail - Head;
83+
}
84+
size_t Available() const
85+
{
86+
return Buffer.size() - Tail;
87+
}
8288
};
8389

8490
void TryIssueRead(RelayDirection& d)

0 commit comments

Comments
 (0)