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
a31ddd50
Commit
a31ddd50
authored
Mar 09, 2022
by
Rob Swindell
💬
Browse files
Interesting, these modern sea plus plusisms
This was necessary to get to build for MSVC2019 and GCC 8.3.0
parent
a5e7b69d
Pipeline
#2861
failed with stage
in 9 minutes and 36 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
src/encode/pascal_types.hpp
src/encode/pascal_types.hpp
+3
-2
No files found.
src/encode/pascal_types.hpp
View file @
a31ddd50
...
...
@@ -26,7 +26,7 @@
#include "xpendian.h"
namespace
Pascal
{
template
<
size_t
size
>
class
String
{
static_assert
(
size
<=
UCHAR_MAX
,
"PascalString size cannot be > 255"
);
...
...
@@ -36,8 +36,9 @@ public:
return
buf
[
0
];
}
void
operator
=
(
const
char
*
s
)
{
using
std
::
min
;
memset
(
buf
,
0
,
size
);
buf
[
0
]
=
(
uint8_t
)
std
::
min
(
size
,
strlen
(
s
));
buf
[
0
]
=
(
uint8_t
)
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