Skip to content
Snippets Groups Projects
Commit 1fdb33ed authored by Studer Gabriel's avatar Studer Gabriel
Browse files

mmcif writer: Don't write loops that contain no data

The previous behaviour was to just write the loop header, followed by nothing
parent aa4c41a5
No related branches found
No related tags found
No related merge requests found
...@@ -204,6 +204,9 @@ public: ...@@ -204,6 +204,9 @@ public:
} }
virtual void ToStream(std::ostream& s) { virtual void ToStream(std::ostream& s) {
if(data_.empty()) {
return; // skip loop, including header
}
s << "loop_" << std::endl; s << "loop_" << std::endl;
desc_.ToStream(s); desc_.ToStream(s);
int desc_size = desc_.GetSize(); int desc_size = desc_.GetSize();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment