Commit ae668530 by Maarten L. Hekkelman

do not install files if they are not downloaded

parents 4a8b1c05 d7a5e598
...@@ -27,7 +27,7 @@ cmake_minimum_required(VERSION 3.16) ...@@ -27,7 +27,7 @@ cmake_minimum_required(VERSION 3.16)
# set the project name # set the project name
project( project(
libcifpp libcifpp
VERSION 7.0.0 VERSION 7.0.1
LANGUAGES CXX) LANGUAGES CXX)
list(PREPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake") list(PREPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
......
Version 7.0.1
- Various reconstruction fixes
- category order in output fixed
Version 7.0.0 Version 7.0.0
- Renaming many methods and parameters to be more - Renaming many methods and parameters to be more
consistent with the mmCIF dictionaries. consistent with the mmCIF dictionaries.
......
...@@ -519,7 +519,7 @@ void checkAtomAnisotropRecords(datablock &db) ...@@ -519,7 +519,7 @@ void checkAtomAnisotropRecords(datablock &db)
{ {
if (cif::VERBOSE and std::exchange(warnReplaceTypeSymbol, false)) if (cif::VERBOSE and std::exchange(warnReplaceTypeSymbol, false))
std::clog << "Replacing type_symbol in atom_site_anisotrop record(s)\n"; std::clog << "Replacing type_symbol in atom_site_anisotrop record(s)\n";
row["type_symbol"] != parent["type_symbol"].text(); row["type_symbol"] = parent["type_symbol"].text();
} }
if (row["pdbx_auth_alt_id"].empty()) if (row["pdbx_auth_alt_id"].empty())
......
...@@ -190,22 +190,41 @@ std::string trim_left_copy(std::string_view s) ...@@ -190,22 +190,41 @@ std::string trim_left_copy(std::string_view s)
void trim_left(std::string &s) void trim_left(std::string &s)
{ {
auto b = s.begin(); auto in = s.begin(), out = s.begin();
while (b != s.end())
while (in != s.end() and std::isspace(*in))
++in;
if (in == s.end())
s.clear();
else if (in != out)
{ {
if (not std::isspace(*b)) while (in != s.end())
break; *out++ = *in++;
s.erase(out, s.end());
b = std::next(b);
} }
s.erase(s.begin(), b);
} }
void trim(std::string &s) void trim(std::string &s)
{ {
trim_right(s); auto in = s.begin(), out = s.begin(), end = s.end();
trim_left(s);
while (end != s.begin() and std::isspace(*(end - 1)))
--end;
while (in != end and std::isspace(*in))
++in;
if (in == end)
s.clear();
else if (in != out)
{
while (in != end)
*out++ = *in++;
s.erase(out, s.end());
}
else if (end != s.end())
s.erase(end, s.end());
} }
std::string trim_copy(std::string_view s) std::string trim_copy(std::string_view s)
......
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