summaryrefslogtreecommitdiffstats
path: root/thirdparty/msdfgen/core/BitmapRef.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'thirdparty/msdfgen/core/BitmapRef.hpp')
-rw-r--r--thirdparty/msdfgen/core/BitmapRef.hpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/thirdparty/msdfgen/core/BitmapRef.hpp b/thirdparty/msdfgen/core/BitmapRef.hpp
index 6f9620dcdf..cb17f95dcb 100644
--- a/thirdparty/msdfgen/core/BitmapRef.hpp
+++ b/thirdparty/msdfgen/core/BitmapRef.hpp
@@ -1,12 +1,10 @@
#pragma once
-#include <cstdlib>
+#include "base.h"
namespace msdfgen {
-typedef unsigned char byte;
-
/// Reference to a 2D image bitmap or a buffer acting as one. Pixel storage not owned or managed by the object.
template <typename T, int N = 1>
struct BitmapRef {
@@ -17,7 +15,7 @@ struct BitmapRef {
inline BitmapRef() : pixels(NULL), width(0), height(0) { }
inline BitmapRef(T *pixels, int width, int height) : pixels(pixels), width(width), height(height) { }
- inline T * operator()(int x, int y) const {
+ inline T *operator()(int x, int y) const {
return pixels+N*(width*y+x);
}
@@ -34,7 +32,7 @@ struct BitmapConstRef {
inline BitmapConstRef(const T *pixels, int width, int height) : pixels(pixels), width(width), height(height) { }
inline BitmapConstRef(const BitmapRef<T, N> &orig) : pixels(orig.pixels), width(orig.width), height(orig.height) { }
- inline const T * operator()(int x, int y) const {
+ inline const T *operator()(int x, int y) const {
return pixels+N*(width*y+x);
}