Skip to content

Commit 1b4c100

Browse files
committed
Got rid of unnecessary and massively problematic max/min macros
1 parent 7e8fce6 commit 1b4c100

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

lcs.h

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
#ifndef LCH_H
22
#define LCS_H
33

4+
#include <algorithm>
5+
46
#include "Matrix.h"
57
#include "RandomAccessSequence.h"
68
#include "DiffErr.h"
@@ -11,10 +13,6 @@
1113
#include <list>
1214

1315

14-
//TODO get rid of these
15-
#define max(N,M) ((N)>(M)? N : M)
16-
#define min(N,M) ((N)<(M)? N : M)
17-
1816
typedef NegIndexVector<uint32_t> Vector;
1917

2018
/**
@@ -219,8 +217,8 @@ class MyersAlgorithm {
219217
int32_t kEnd = k_end();
220218

221219
//Only check the diagonals that have been walked in the other direction
222-
int32_t kb = max(size_delta - kEnd, kBegin);
223-
int32_t ke = min(size_delta - kBegin, kEnd);
220+
int32_t kb = std::max(size_delta - kEnd, kBegin);
221+
int32_t ke = std::min(size_delta - kBegin, kEnd);
224222

225223
for (int k = kb; k <= ke; k++) {
226224
int k_r = size_delta - k;

0 commit comments

Comments
 (0)