~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/global.h

  • Committer: Brian Aker
  • Date: 2008-10-10 00:15:11 UTC
  • mfrom: (492.1.9 codestyle)
  • Revision ID: brian@tangent.org-20081010001511-eppqbw2u9rdqwffp
Handling Monty's merge

Show diffs side-by-side

added added

removed removed

Lines of Context:
121
121
extern char _dig_vec_upper[];
122
122
extern char _dig_vec_lower[];
123
123
 
124
 
#if defined(__cplusplus)
125
 
template <class T>
126
 
inline bool test(const T a)
127
 
{
128
 
  return a ? true : false;
129
 
}
130
 
template <class T, class U>
131
 
inline bool test_all_bits(const T a, const U b)
132
 
{
133
 
  return ((a & b) == b);
134
 
}
135
 
#else
136
 
#define test(a)    ((a) ? 1 : 0)
137
 
#define test_all_bits(a,b) (((a) & (b)) == (b))
138
 
#endif
139
 
 
140
124
#define set_if_bigger(a,b)  do { if ((a) < (b)) (a)=(b); } while(0)
141
125
 
142
126
#define set_if_smaller(a,b) do { if ((a) > (b)) (a)=(b); } while(0)