summaryrefslogtreecommitdiff
path: root/odb/relational/schema.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2011-07-08 13:20:09 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2011-07-08 13:20:09 +0200
commitbebd8368d17b8bfe245cab04d6118f50933216d3 (patch)
tree3b25082333d7d615ee34f4ae4cc897dff187769c /odb/relational/schema.cxx
parent8ea45e39522f7040048c28dbeae853eea6b03b71 (diff)
Have separate table set for each schema generation pass
Diffstat (limited to 'odb/relational/schema.cxx')
-rw-r--r--odb/relational/schema.cxx17
1 files changed, 7 insertions, 10 deletions
diff --git a/odb/relational/schema.cxx b/odb/relational/schema.cxx
index 87e0533..6acb6dc 100644
--- a/odb/relational/schema.cxx
+++ b/odb/relational/schema.cxx
@@ -86,9 +86,7 @@ namespace relational
traversal::unit unit;
traversal::defines unit_defines;
traversal::namespace_ ns;
-
- unsigned short pass (1);
- instance<class_create> c (emitter, pass);
+ instance<class_create> c (emitter);
unit >> unit_defines >> ns;
unit_defines >> c;
@@ -98,14 +96,13 @@ namespace relational
ns >> ns_defines >> ns;
ns_defines >> c;
- // Pass 1.
+ // Pass 1 and 2.
//
- unit.dispatch (ctx.unit);
-
- // Pass 2.
- //
- pass = 2;
- unit.dispatch (ctx.unit);
+ for (unsigned short pass (1); pass < 3; ++pass)
+ {
+ c->pass (pass);
+ unit.dispatch (ctx.unit);
+ }
}
}
}