Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Main
Synchronet
Commits
e18b6e9c
Commit
e18b6e9c
authored
Mar 09, 2022
by
Rob Swindell
💬
Browse files
std::min() wasn't in scope when using gcc <shrug>
parent
85d9915b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
src/encode/pascal_types.hpp
src/encode/pascal_types.hpp
+2
-1
No files found.
src/encode/pascal_types.hpp
View file @
e18b6e9c
...
...
@@ -21,6 +21,7 @@
#include <climits>
#include <cstdint>
#include <algorithm> // std::min
#include "gen_defs.h"
#include "xpendian.h"
...
...
@@ -36,7 +37,7 @@ public:
}
void
operator
=
(
const
char
*
s
)
{
memset
(
buf
,
0
,
size
);
buf
[
0
]
=
(
uint8_t
)
min
(
size
,
strlen
(
s
));
buf
[
0
]
=
(
uint8_t
)
std
::
min
(
size
,
strlen
(
s
));
memcpy
(
buf
+
1
,
s
,
len
());
}
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment