Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
code
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ReadMailReallyFast
code
Commits
53cd6338
Commit
53cd6338
authored
1 year ago
by
Benny Baumann
Browse files
Options
Downloads
Patches
Plain Diff
fix: Use size_t for counts of objects
parent
dd63cf5f
Branches
master
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#10686
failed
1 year ago
Stage: prebuild
Stage: build
Stage: testing
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/net/address.hpp
+1
-1
1 addition, 1 deletion
src/net/address.hpp
src/net/async_server.hpp
+4
-4
4 additions, 4 deletions
src/net/async_server.hpp
with
5 additions
and
5 deletions
src/net/address.hpp
+
1
−
1
View file @
53cd6338
...
...
@@ -353,7 +353,7 @@ static constexpr int inet6_aton(const char (&str)[N], struct in6_addr &in6)
return
-
1
;
}
for
(
unsigned
i
=
0
;
i
<
comps
.
size
();
i
++
)
{
for
(
size_t
i
=
0
;
i
<
comps
.
size
();
i
++
)
{
// We have reached the end of the string before parsing all the components.
// That is possible only if we have previously encountered a shortener token.
if
(
idx
==
N
-
1
)
{
...
...
This diff is collapsed.
Click to expand it.
src/net/async_server.hpp
+
4
−
4
View file @
53cd6338
...
...
@@ -31,8 +31,8 @@ public:
private:
auto_fd
socket
;
std
::
atomic_
uint32
_t
number_of_connected_clients
;
unsigned
in
t
max_number_of_simulataneusly_allowed_clients
;
std
::
atomic_
size
_t
number_of_connected_clients
;
size_
t
max_number_of_simulataneusly_allowed_clients
;
accept_handler_type
on_accept
;
accept_handler_type
on_overflow
;
...
...
@@ -103,7 +103,7 @@ public:
* @brief Get the current number of connected clients.
* @return The number of connected clients
*/
[[
nodiscard
]]
inline
unsigned
in
t
get_number_of_connected_clients
()
const
{
[[
nodiscard
]]
inline
size_
t
get_number_of_connected_clients
()
const
{
return
this
->
number_of_connected_clients
;
}
...
...
@@ -114,7 +114,7 @@ public:
* @brief Set the maximum allowed simultaneus connections.
* @param max_connections The maximum number of allowed connections.
*/
inline
void
set_maximum_concurrent_connections
(
unsigned
in
t
max_connections
)
{
inline
void
set_maximum_concurrent_connections
(
size_
t
max_connections
)
{
this
->
max_number_of_simulataneusly_allowed_clients
=
max_connections
;
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment