Skip to content
Snippets Groups Projects
Commit d18654f7 authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Fix min() not being in scope when using GCC <C++, shrug>

parent 4b5a75c3
No related branches found
No related tags found
1 merge request!463MRC mods by Codefenix (2024-10-20)
......@@ -22,6 +22,7 @@
#ifndef PCBDEFS_HPP_
#define PCBDEFS_HPP_
#include <algorithm> // std::min
#include "endian.hpp"
namespace PCBoard {
......@@ -47,6 +48,7 @@ class string {
char value[size]{};
public:
void operator = (const char* s) {
using std::min;
memset(value, ' ', size);
memcpy(value, s, min(size, strlen(s)));
}
......
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