aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2011-12-21 11:08:56 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2012-01-20 15:43:45 +0200
commit7d622a7706882946faa1ec46577f356b3942287d (patch)
tree305098b751dc897509a819b2f6e48c2df4186681
parentb35806717070092cb3df269eaba7a8a16b8f1da8 (diff)
Use static variables instead of extern in unnamed namespace
-rw-r--r--odb/relational/mysql/common.cxx116
-rw-r--r--odb/relational/mysql/source.cxx1
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) {}