Commit d18654f7 authored by Rob Swindell's avatar Rob Swindell 💬
Browse files

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

parent 4b5a75c3
......@@ -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)));
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment