Skip to content
Permalink
Browse files

add cstring include for std::memcpy

  • Loading branch information...
RobertBColton committed May 16, 2019
1 parent 985c977 commit db593b232bfc7b657d1b65b25a368c9cb9ef0790
Showing with 3 additions and 1 deletion.
  1. +3 −1 ENIGMAsystem/SHELL/Graphics_Systems/OpenGL/GLtextures.cpp
@@ -23,6 +23,8 @@
#include "Graphics_Systems/General/GSprimitives.h"
#include "Graphics_Systems/graphics_mandatory.h"

#include <cstring> // for std::memcpy

/*enum {
//Formats and internal formats
tx_rgba = GL_RGBA,
@@ -120,7 +122,7 @@ unsigned char* graphics_copy_texture_pixels(int texture, int x, int y, int width

unsigned char* cropped = new unsigned char[height*dp];
for (int i = 0; i < height; ++i) {
memcpy(cropped + i*dp, pxdata + (i+y)*sp + x*bpp, dp);
std::memcpy(cropped + i*dp, pxdata + (i+y)*sp + x*bpp, dp);
}
delete[] pxdata;

0 comments on commit db593b2

Please sign in to comment.
You can’t perform that action at this time.