Skip to content

Commit

Permalink
Remove unused FILL macro
Browse files Browse the repository at this point in the history
  • Loading branch information
Rangi42 committed Aug 20, 2020
1 parent d83cc40 commit ee2470b
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 22 deletions.
1 change: 0 additions & 1 deletion src/image-to-tiles.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
#include <set>
#include <map>
#include <iterator>
#include <algorithm>

#pragma warning(push, 0)
#include <FL/Fl.H>
Expand Down
20 changes: 1 addition & 19 deletions src/utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#include <cmath>
#include <string>
#include <string_view>
#include <algorithm>

#ifdef _WIN32
#define DIR_SEP "\\"
Expand All @@ -17,25 +18,6 @@
#define STRINGIFY(x) _STRINGIFY_HELPER(x)
#define _STRINGIFY_HELPER(x) #x

#ifdef _WIN32
#define FILL(a, v, n) \
__pragma(warning(push)) \
__pragma(warning(disable:4127)) \
do { \
for (size_t __fill_i_ = 0; __fill_i_ < (size_t)(n); __fill_i_++) { \
a[__fill_i_] = (v); \
} \
} while (0) \
__pragma(warning(pop))
#else
#define FILL(a, v, n) \
do { \
for (size_t __fill_i_ = 0; __fill_i_ < (size_t)(n); __fill_i_++) { \
a[__fill_i_] = (v); \
} \
} while (0)
#endif

#ifndef _countof
#define _countof(a) (sizeof(a) / sizeof(a[0]))
#endif
Expand Down
2 changes: 0 additions & 2 deletions src/widgets.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#include <algorithm>

#pragma warning(push, 0)
#include <FL/Fl.H>
#include <FL/Fl_Box.H>
Expand Down

0 comments on commit ee2470b

Please sign in to comment.