Skip to content

Commit

Permalink
Repaired an implicit cast between WORD and int
Browse files Browse the repository at this point in the history
  • Loading branch information
vermaseren committed Nov 2, 2018
1 parent cb1b29f commit a85f0c1
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 7 deletions.
4 changes: 2 additions & 2 deletions sources/declare.h
Original file line number Diff line number Diff line change
Expand Up @@ -1472,8 +1472,8 @@ extern int ReleaseTB(VOID);

extern int SymbolNormalize(WORD *);
extern int TestFunFlag(PHEAD WORD *);
extern int CompareSymbols(WORD *,WORD *,WORD);
extern int CompareHSymbols(WORD *,WORD *,WORD);
extern WORD CompareSymbols(WORD *,WORD *,WORD);
extern WORD CompareHSymbols(WORD *,WORD *,WORD);
extern WORD NextPrime(PHEAD WORD);
extern UWORD wranf(PHEAD0);
extern UWORD iranf(PHEAD UWORD);
Expand Down
2 changes: 1 addition & 1 deletion sources/gentopo.cc
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ class MNodeClass {
int **clmat; // matrix used for classification
int *flist; // the first node in each class
int maxdeg; // maximal value of degree(node)
int forallignment;
int forallignment;

MNodeClass(int nnodes, int ncl);
~MNodeClass();
Expand Down
5 changes: 5 additions & 0 deletions sources/optimize.cc
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,11 @@
#include <algorithm>
#include <iostream>

#ifdef APPLE64
#define HAVE_UNORDERED_MAP
#define HAVE_UNORDERED_SET
#endif

#ifdef HAVE_UNORDERED_MAP
#include <unordered_map>
using std::unordered_map;
Expand Down
8 changes: 4 additions & 4 deletions sources/sort.c
Original file line number Diff line number Diff line change
Expand Up @@ -2957,7 +2957,7 @@ WORD Compare1(WORD *term1, WORD *term2, WORD level)

/*
#] Compare1 :
#[ CompareSymbols : int CompareSymbols(term1,term2,par)
#[ CompareSymbols : WORD CompareSymbols(term1,term2,par)
*/
/**
* Compares the terms, based on the value of AN.polysortflag.
Expand All @@ -2972,7 +2972,7 @@ WORD Compare1(WORD *term1, WORD *term2, WORD level)
* to that of Compare1 which is the regular compare routine in sort.c
*/

int CompareSymbols(WORD *term1, WORD *term2, WORD par)
WORD CompareSymbols(WORD *term1, WORD *term2, WORD par)
{
GETIDENTITY
int sum1, sum2;
Expand Down Expand Up @@ -3005,7 +3005,7 @@ int CompareSymbols(WORD *term1, WORD *term2, WORD par)

/*
#] CompareSymbols :
#[ CompareHSymbols : int CompareHSymbols(term1,term2,par)
#[ CompareHSymbols : WORD CompareHSymbols(term1,term2,par)
*/
/**
* Compares terms that can have only SYMBOL and HAAKJE subterms.
Expand All @@ -3016,7 +3016,7 @@ int CompareSymbols(WORD *term1, WORD *term2, WORD par)
* to that of Compare1 which is the regular compare routine in sort.c
*/

int CompareHSymbols(WORD *term1, WORD *term2, WORD par)
WORD CompareHSymbols(WORD *term1, WORD *term2, WORD par)
{
GETIDENTITY
WORD *t1, *t2, *tt1, *tt2, *ttt1, *ttt2;
Expand Down

0 comments on commit a85f0c1

Please sign in to comment.