epezent / implot

Immediate Mode Plotting
MIT License
4.78k stars 531 forks source link

Avoid warning C4005: 'IMPLOT_DISABLE_OBSOLETE_FUNCTIONS': macro redefinition #326

Closed Demonese closed 2 years ago

Demonese commented 2 years ago

In implot_demo.cpp, consider changing

// ImPlot v0.13 WIP

// We define this so that the demo does not accidentally use deprecated API
#define IMPLOT_DISABLE_OBSOLETE_FUNCTIONS

#include "implot.h"
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>

to

// ImPlot v0.13 WIP

// We define this so that the demo does not accidentally use deprecated API
#ifndef IMPLOT_DISABLE_OBSOLETE_FUNCTIONS
#define IMPLOT_DISABLE_OBSOLETE_FUNCTIONS
#endif

#include "implot.h"
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>