Ignore:
Timestamp:
Mar 24, 2009 6:26:09 PM (11 years ago)
Author:
pbelotti
Message:

trying again compatibility with MSVC

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Couenne/src/readnl/invmap.cpp

    r79 r80  
    1616#include "r_opn.hd"
    1717
    18 #if defined(_MSC_VER)
    19 typedef void * fcn_ptr;
    20 #else
    21 typedef long int fcn_ptr;
    22 #endif
    23 
     18//#define Intcast (int)(long)
    2419
    2520/* couples an ASL function pointer with the relative operator constant */
     
    3934  /* FIX! weak cast for 64 bit machines */
    4035
    41   register fcn_ptr f1 = (fcn_ptr) (((AslCouPair *) p1) -> fp);
    42   register fcn_ptr f2 = (fcn_ptr) (((AslCouPair *) p2) -> fp);
     36  register int f1 = Intcast (((AslCouPair *) p1) -> fp);
     37  register int f2 = Intcast (((AslCouPair *) p2) -> fp);
    4338
    4439  if      (f1 < f2) return -1;
     
    6257  /* FIX cast fo 64 bit machines */
    6358
    64   if (((fcn_ptr) f <  N_OPS) &&
    65       ((fcn_ptr) f > -N_OPS))
    66     return (fcn_ptr) f;
     59  if ((Intcast f <  N_OPS) &&
     60      (Intcast f > -N_OPS))
     61    return Intcast f;
    6762
    6863  key.fp = f;
Note: See TracChangeset for help on using the changeset viewer.