Commit d3432ed8 by Maarten L. Hekkelman

merging in fixes from develop branch

parent 72fd03a6
...@@ -215,7 +215,8 @@ namespace detail ...@@ -215,7 +215,8 @@ namespace detail
if (m_single_hit.has_value() or ri->m_single_hit.has_value()) if (m_single_hit.has_value() or ri->m_single_hit.has_value())
return m_single_hit == ri->m_single_hit; return m_single_hit == ri->m_single_hit;
else else
return m_item_ix == ri->m_item_ix and m_value == ri->m_value; // watch out, both m_item_ix might be the same while tags might be diffent (in case they both do not exist in the category)
return m_item_ix == ri->m_item_ix and m_value == ri->m_value and m_item_tag == ri->m_item_tag;
} }
return this == rhs; return this == rhs;
} }
...@@ -272,7 +273,8 @@ namespace detail ...@@ -272,7 +273,8 @@ namespace detail
if (m_single_hit.has_value() or ri->m_single_hit.has_value()) if (m_single_hit.has_value() or ri->m_single_hit.has_value())
return m_single_hit == ri->m_single_hit; return m_single_hit == ri->m_single_hit;
else else
return m_item_ix == ri->m_item_ix and m_value == ri->m_value; // watch out, both m_item_ix might be the same while tags might be diffent (in case they both do not exist in the category)
return m_item_ix == ri->m_item_ix and m_value == ri->m_value and m_item_tag == ri->m_item_tag;
} }
return this == rhs; return this == rhs;
} }
...@@ -857,4 +859,4 @@ namespace literals ...@@ -857,4 +859,4 @@ namespace literals
} }
} // namespace literals } // namespace literals
} // namespace cif } // namespace cif
\ No newline at end of file
...@@ -50,7 +50,7 @@ class atom ...@@ -50,7 +50,7 @@ class atom
private: private:
struct atom_impl : public std::enable_shared_from_this<atom_impl> struct atom_impl : public std::enable_shared_from_this<atom_impl>
{ {
atom_impl(datablock &db, std::string_view id) atom_impl(const datablock &db, std::string_view id)
: m_db(db) : m_db(db)
, m_cat(db["atom_site"]) , m_cat(db["atom_site"])
, m_id(id) , m_id(id)
...@@ -111,7 +111,7 @@ class atom ...@@ -111,7 +111,7 @@ class atom
} }
const datablock &m_db; const datablock &m_db;
category &m_cat; const category &m_cat;
std::string m_id; std::string m_id;
point m_location; point m_location;
std::string m_symop = "1_555"; std::string m_symop = "1_555";
...@@ -130,7 +130,7 @@ class atom ...@@ -130,7 +130,7 @@ class atom
{ {
} }
atom(datablock &db, row_handle &row) atom(const datablock &db, const row_handle &row)
: atom(std::make_shared<atom_impl>(db, row["id"].as<std::string>())) : atom(std::make_shared<atom_impl>(db, row["id"].as<std::string>()))
{ {
} }
......
...@@ -2337,6 +2337,7 @@ boo.data_.whatever ...@@ -2337,6 +2337,7 @@ boo.data_.whatever
'stop_' 'stop_'
'loop_' 'loop_'
'global_' 'global_'
'_with.leading_underscore'
)"_cf; )"_cf;
auto &db1 = data1.front(); auto &db1 = data1.front();
...@@ -2355,7 +2356,8 @@ boo.data_.whatever ...@@ -2355,7 +2356,8 @@ boo.data_.whatever
{ "data_.whatever", false }, { "data_.whatever", false },
{ "stop_", false }, { "stop_", false },
{ "loop_", false }, { "loop_", false },
{ "global_", false } { "global_", false },
{ "_with.leading_underscore", false }
}; };
BOOST_CHECK_EQUAL(test1.size(), sizeof(kS) / sizeof(T)); BOOST_CHECK_EQUAL(test1.size(), sizeof(kS) / sizeof(T));
......
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