~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to client/drizzletest.cc

  • Committer: Monty Taylor
  • Date: 2010-04-01 17:45:30 UTC
  • mto: (1300.5.24 drizzled-as-lib)
  • mto: This revision was merged to the branch mainline in revision 1479.
  • Revision ID: mordred@inaugust.com-20100401174530-9n6jdatgreroas44
Use unordered_map from the upcoming c++0x standard instead of a homemade
hash_map.h. For the one platform we have that doesn't properly support it
(hi, centos5) we make two quick classes just to rename the hash_map there to
the standard unordred_map.
Change the codebase to use unordered_map and unordered_set.

Show diffs side-by-side

added added

removed removed

Lines of Context:
58
58
#include PCRE_HEADER
59
59
 
60
60
#include <stdarg.h>
 
61
#include <drizzled/unordered_map.h>
61
62
 
62
63
#include "errname.h"
63
64
 
64
65
/* Added this for string translation. */
65
66
#include "drizzled/gettext.h"
66
 
#include "drizzled/hash.h"
67
67
#include "drizzled/my_time.h"
68
68
#include "drizzled/charset.h"
69
69
 
208
208
VAR var_reg[10];
209
209
 
210
210
 
211
 
drizzled::hash_map<string, VAR *> var_hash;
 
211
unordered_map<string, VAR *> var_hash;
212
212
 
213
213
struct st_connection
214
214
{
1703
1703
      die("Too long variable name: %s", save_var_name);
1704
1704
 
1705
1705
    string save_var_name_str(save_var_name, length);
1706
 
    drizzled::hash_map<string, VAR*>::iterator iter=
 
1706
    unordered_map<string, VAR*>::iterator iter=
1707
1707
      var_hash.find(save_var_name_str);
1708
1708
    if (iter == var_hash.end())
1709
1709
    {
1741
1741
static VAR *var_obtain(const char *name, int len)
1742
1742
{
1743
1743
  string var_name(name, len);
1744
 
  drizzled::hash_map<string, VAR*>::iterator iter=
 
1744
  unordered_map<string, VAR*>::iterator iter=
1745
1745
    var_hash.find(var_name);
1746
1746
  if (iter != var_hash.end())
1747
1747
    return (*iter).second;