aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2010-11-30 08:58:43 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2010-11-30 08:58:43 +0200
commit04690edcfd9c7c5b431f30baee874d58ab825587 (patch)
tree1d0b7568c1a7c1b5ee70aaf9f06d1def0504ebe5
parent9aab700d7fa01d0e6d2614ec22450241807b81be (diff)
Cosmetic changes
-rw-r--r--odb/header.cxx17
-rw-r--r--odb/mysql/header.cxx9
2 files changed, 12 insertions, 14 deletions
diff --git a/odb/header.cxx b/odb/header.cxx
index d7fed95..f838fb1 100644
--- a/odb/header.cxx
+++ b/odb/header.cxx
@@ -81,11 +81,12 @@ void
generate_header (context& ctx)
{
ctx.os << "#include <memory>" << endl
+ << "#include <cstddef>" << endl // std::size_t
<< endl;
ctx.os << "#include <odb/core.hxx>" << endl
<< "#include <odb/traits.hxx>" << endl
- << endl;
+ << "#include <odb/pointer-traits.hxx>" << endl;
// In case of a boost TR1 implementation, we cannot distinguish
// between the boost::shared_ptr and std::tr1::shared_ptr usage since
@@ -95,18 +96,24 @@ generate_header (context& ctx)
if (ctx.unit.count ("tr1-pointer-used") &&
ctx.unit.get<bool> ("tr1-pointer-used"))
{
- ctx.os << "#include <odb/tr1-pointer-traits.hxx>" << endl
- << endl;
+ ctx.os << "#include <odb/tr1-pointer-traits.hxx>" << endl;
}
else if (ctx.unit.count ("boost-pointer-used") &&
ctx.unit.get<bool> ("boost-pointer-used"))
{
ctx.os << "#ifdef BOOST_TR1_MEMORY_HPP_INCLUDED" << endl
<< "# include <odb/tr1-pointer-traits.hxx>" << endl
- << "#endif" << endl
- << endl;
+ << "#endif" << endl;
}
+ ctx.os << "#include <odb/container-traits.hxx>" << endl;
+
+ if (ctx.options.generate_query ())
+ ctx.os << "#include <odb/result.hxx>" << endl;
+
+ ctx.os << endl;
+
+
/*
traversal::unit unit;
traversal::defines unit_defines;
diff --git a/odb/mysql/header.cxx b/odb/mysql/header.cxx
index 83ab5a7..3add95e 100644
--- a/odb/mysql/header.cxx
+++ b/odb/mysql/header.cxx
@@ -979,15 +979,6 @@ namespace mysql
ns >> ns_defines >> ns;
ns_defines >> c;
- ctx.os << "#include <cstddef>" << endl // std::size_t
- << endl;
-
- if (ctx.options.generate_query ())
- ctx.os << "#include <odb/result.hxx>" << endl;
-
- ctx.os << "#include <odb/container-traits.hxx>" << endl
- << endl;
-
ctx.os << "#include <odb/mysql/version.hxx>" << endl
<< "#include <odb/mysql/forward.hxx>" << endl
<< "#include <odb/mysql/mysql-types.hxx>" << endl;