Commit f7b12ded by maarten

fix in map-maker... oef

git-svn-id: svn+ssh://gitlab/srv/svn-repos/pdb-redo/trunk@414 a1961a4f-ab94-4bcc-80e8-33b5a54de466
parent 2cce9e53
......@@ -389,7 +389,10 @@ namespace detail
// are compatible. That means the number of parameters to the get()
// of the row should be equal to the number of items in the tuple
// you are trying to tie.
mVal = rr;
using RType = std::tuple<typename std::remove_reference<Ts>::type...>;
mVal = static_cast<RType>(rr);
}
std::tuple<Ts...> mVal;
......@@ -397,9 +400,9 @@ namespace detail
}
template<typename... Ts>
auto tie(Ts&... v) -> detail::tieWrap<Ts...>
auto tie(Ts&... v) -> detail::tieWrap<Ts&...>
{
return detail::tieWrap<Ts...>(v...);
return detail::tieWrap<Ts&...>(std::forward<Ts&>(v)...);
}
class Row
......
......@@ -44,8 +44,8 @@ static const char* kEmptyResult = "";
struct ItemValue
{
ItemValue* mNext;
uint32_t mColumnIndex;
char mText[0];
uint32_t mColumnIndex;
char mText[4];
ItemValue(const char* v, uint32_t columnIndex);
~ItemValue();
......@@ -76,7 +76,7 @@ ItemValue::~ItemValue()
void* ItemValue::operator new(size_t size, size_t dataSize)
{
return malloc(size + dataSize + 1);
return malloc(size - 4 + dataSize + 1);
}
void ItemValue::operator delete(void* p)
......
......@@ -128,7 +128,7 @@ tuple<float,float,float,float> CalculateMapStatistics(const clipper::Xmap<FTYPE>
clipper::Xmap_base::Map_reference_coord c(xmap);
for (int g0 = r.min()[0]; g0 <= r.max()[0]; ++g0)
for (int g1 = r.min()[1]; g1 <= r.max()[0]; ++g1)
for (int g1 = r.min()[1]; g1 <= r.max()[1]; ++g1)
for (int g2 = r.min()[2]; g2 <= r.max()[2]; ++g2)
{
c.set_coord({ g0, g1, g2});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment