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

std::min() wasn't in scope when using gcc <shrug>

parent 85d9915b
...@@ -21,6 +21,7 @@ ...@@ -21,6 +21,7 @@
#include <climits> #include <climits>
#include <cstdint> #include <cstdint>
#include <algorithm> // std::min
#include "gen_defs.h" #include "gen_defs.h"
#include "xpendian.h" #include "xpendian.h"
...@@ -36,7 +37,7 @@ public: ...@@ -36,7 +37,7 @@ public:
} }
void operator = (const char* s) { void operator = (const char* s) {
memset(buf, 0, size); 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()); memcpy(buf + 1, s, len());
} }
}; };
......
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