From 7d622a7706882946faa1ec46577f356b3942287d Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 21 Dec 2011 11:08:56 +0200 Subject: Use static variables instead of extern in unnamed namespace --- odb/relational/mysql/common.cxx | 116 +++++++++++++++++++--------------------- odb/relational/mysql/source.cxx | 1 - 2 files changed, 55 insertions(+), 62 deletions(-) diff --git a/odb/relational/mysql/common.cxx b/odb/relational/mysql/common.cxx index f7486cd..8e04fcf 100644 --- a/odb/relational/mysql/common.cxx +++ b/odb/relational/mysql/common.cxx @@ -216,23 +216,20 @@ namespace relational // member_image_type // - namespace + static const char* integer_types[] = { - const char* integer_types[] = - { - "char", - "short", - "int", - "int", - "long long" - }; - - const char* float_types[] = - { - "float", - "double" - }; - } + "char", + "short", + "int", + "int", + "long long" + }; + + static const char* float_types[] = + { + "float", + "double" + }; member_image_type:: member_image_type (semantics::type* type, @@ -321,53 +318,50 @@ namespace relational // member_database_type // - namespace + static const char* integer_database_id[] = { - const char* integer_database_id[] = - { - "id_tiny", - "id_utiny", - "id_short", - "id_ushort", - "id_long", // INT24 - "id_ulong", // INT24 UNSIGNED - "id_long", - "id_ulong", - "id_longlong", - "id_ulonglong" - }; - - const char* float_database_id[] = - { - "id_float", - "id_double" - }; + "id_tiny", + "id_utiny", + "id_short", + "id_ushort", + "id_long", // INT24 + "id_ulong", // INT24 UNSIGNED + "id_long", + "id_ulong", + "id_longlong", + "id_ulonglong" + }; - const char* date_time_database_id[] = - { - "id_date", - "id_time", - "id_datetime", - "id_timestamp", - "id_year" - }; - - const char* char_bin_database_id[] = - { - "id_string", // CHAR - "id_blob", // BINARY, - "id_string", // VARCHAR - "id_blob", // VARBINARY - "id_string", // TINYTEXT - "id_blob", // TINYBLOB - "id_string", // TEXT - "id_blob", // BLOB - "id_string", // MEDIUMTEXT - "id_blob", // MEDIUMBLOB - "id_string", // LONGTEXT - "id_blob" // LONGBLOB - }; - } + static const char* float_database_id[] = + { + "id_float", + "id_double" + }; + + static const char* date_time_database_id[] = + { + "id_date", + "id_time", + "id_datetime", + "id_timestamp", + "id_year" + }; + + static const char* char_bin_database_id[] = + { + "id_string", // CHAR + "id_blob", // BINARY, + "id_string", // VARCHAR + "id_blob", // VARBINARY + "id_string", // TINYTEXT + "id_blob", // TINYBLOB + "id_string", // TEXT + "id_blob", // BLOB + "id_string", // MEDIUMTEXT + "id_blob", // MEDIUMBLOB + "id_string", // LONGTEXT + "id_blob" // LONGBLOB + }; member_database_type_id:: member_database_type_id (semantics::type* type, diff --git a/odb/relational/mysql/source.cxx b/odb/relational/mysql/source.cxx index 06d40b7..b709648 100644 --- a/odb/relational/mysql/source.cxx +++ b/odb/relational/mysql/source.cxx @@ -63,7 +63,6 @@ namespace relational // // - // struct object_columns: relational::object_columns, context { object_columns (base const& x): base (x) {} -- cgit v1.1