~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_bitmap.cc

  • Committer: Padraig O'Sullivan
  • Date: 2010-09-30 04:33:56 UTC
  • mto: (1823.1.1 trunk-drizzle)
  • mto: This revision was merged to the branch mainline in revision 1824.
  • Revision ID: osullivan.padraig@gmail.com-20100930043356-6d47l4am5od380nq
Replaced one instance of MyBitmap with dynamic_bitset from boost. Added some utility functions to MyBitmap temporarily in order to accomplish this.

Show diffs side-by-side

added added

removed removed

Lines of Context:
316
316
}
317
317
 
318
318
 
 
319
void bitmap_subtract(boost::dynamic_bitset<>& map, const MyBitmap *map2)
 
320
{
 
321
  for (boost::dynamic_bitset<>::size_type i= 0; i < map.size(); i++)
 
322
  {
 
323
    if (map2->isBitSet(i))
 
324
    {
 
325
      map.reset(i);
 
326
    }
 
327
    else
 
328
    {
 
329
      map.set(i);
 
330
    }
 
331
  }
 
332
}
 
333
 
 
334
 
319
335
void bitmap_union(MyBitmap *map, const MyBitmap *map2)
320
336
{
321
337
  my_bitmap_map *to= map->getBitmap(), *from= map2->getBitmap(), *end;
331
347
}
332
348
 
333
349
 
 
350
void bitmap_union(MyBitmap *map, const boost::dynamic_bitset<>& map2)
 
351
{
 
352
  for (boost::dynamic_bitset<>::size_type i= 0; i < map2.size(); i++)
 
353
  {
 
354
    if (map2.test(i))
 
355
    {
 
356
      map->setBit(i);
 
357
    }
 
358
  }
 
359
}
 
360
 
 
361
 
334
362
void bitmap_xor(MyBitmap *map, const MyBitmap *map2)
335
363
{
336
364
  my_bitmap_map *to= map->getBitmap();