mirror of
https://github.com/Drezil/imgui.git
synced 2024-12-17 21:56:36 +00:00
Minor tweaks to "Memory override" pull request
This commit is contained in:
parent
22a9555a99
commit
c07ab1b56a
13
imconfig.h
13
imconfig.h
@ -5,16 +5,9 @@
|
||||
#pragma once
|
||||
|
||||
//---- Define your own malloc/free/realloc functions if you want to override internal memory allocations for ImGui
|
||||
/*
|
||||
#define IM_MALLOC(_SIZE) MyMalloc(_SIZE)
|
||||
#define IM_FREE(_PTR) MyFree(_PTR)
|
||||
#define IM_REALLOC(_PTR, _SIZE) MyRealloc(_PTR, _SIZE)
|
||||
|
||||
#include <stdlib.h> // size_t
|
||||
void* MyMalloc(size_t size);
|
||||
void MyFree(void *ptr);
|
||||
void* MyRealloc(void *ptr, size_t size);
|
||||
*/
|
||||
//#define IM_MALLOC(_SIZE) MyMalloc(_SIZE) // void* MyMalloc(size_t size);
|
||||
//#define IM_FREE(_PTR) MyFree(_PTR) // void MyFree(void *ptr);
|
||||
//#define IM_REALLOC(_PTR, _SIZE) MyRealloc(_PTR, _SIZE) // void* MyRealloc(void *ptr, size_t size);
|
||||
|
||||
//---- Define your own ImVector<> type if you don't want to use the provided implementation defined in imgui.h
|
||||
//#include <vector>
|
||||
|
@ -194,7 +194,6 @@
|
||||
#pragma warning (disable: 4996) // 'This function or variable may be unsafe': strcpy, strdup, sprintf, vsnprintf, sscanf, fopen
|
||||
#endif
|
||||
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
// Forward Declarations
|
||||
//-------------------------------------------------------------------------
|
||||
@ -666,7 +665,7 @@ struct ImGuiState
|
||||
// Logging
|
||||
bool LogEnabled;
|
||||
FILE* LogFile;
|
||||
ImGuiTextBuffer* LogClipboard;
|
||||
ImGuiTextBuffer* LogClipboard; // pointer so our GImGui static constructor doesn't call heap allocators.
|
||||
int LogAutoExpandMaxDepth;
|
||||
|
||||
ImGuiState()
|
||||
|
3
imgui.h
3
imgui.h
@ -17,7 +17,7 @@ struct ImGuiWindow;
|
||||
#include "imconfig.h"
|
||||
#include <float.h> // FLT_MAX
|
||||
#include <stdarg.h> // va_list
|
||||
#include <stdlib.h> // NULL
|
||||
#include <stdlib.h> // NULL, malloc
|
||||
|
||||
#ifndef IM_MALLOC
|
||||
#define IM_MALLOC(_SIZE) malloc((_SIZE))
|
||||
@ -70,7 +70,6 @@ struct ImVec4
|
||||
// std::vector<> like class to avoid dragging dependencies (also: windows implementation of STL with debug enabled is absurdly slow, so let's bypass it so our code runs fast in debug).
|
||||
// this implementation does NOT call c++ constructors! we don't need them! also only provide the minimum functionalities we need.
|
||||
#ifndef ImVector
|
||||
|
||||
template<typename T>
|
||||
class ImVector
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user