Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
libcifpp
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
open
libcifpp
Commits
760e2369
Unverified
Commit
760e2369
authored
Aug 09, 2021
by
Maarten L. Hekkelman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove suprious error messages,
fix getUniqueID to use correct key field
parent
cfba00ae
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
8 deletions
+15
-8
src/Cif++.cpp
+9
-2
src/Compound.cpp
+6
-6
No files found.
src/Cif++.cpp
View file @
760e2369
...
@@ -1389,13 +1389,17 @@ std::string Category::getUniqueID(std::function<std::string(int)> generator)
...
@@ -1389,13 +1389,17 @@ std::string Category::getUniqueID(std::function<std::string(int)> generator)
{
{
using
namespace
cif
::
literals
;
using
namespace
cif
::
literals
;
std
::
string
key
=
"id"
;
if
(
mCatValidator
!=
nullptr
and
mCatValidator
->
mKeys
.
size
()
==
1
)
key
=
mCatValidator
->
mKeys
.
front
();
int
nr
=
size
()
+
1
;
int
nr
=
size
()
+
1
;
for
(;;)
for
(;;)
{
{
std
::
string
result
=
generator
(
nr
++
);
std
::
string
result
=
generator
(
nr
++
);
if
(
exists
(
"id"
_key
==
result
))
if
(
exists
(
Key
(
key
)
==
result
))
continue
;
continue
;
return
result
;
return
result
;
...
@@ -2579,8 +2583,11 @@ void Category::update_value(RowSet &&rows, const std::string &tag, const std::st
...
@@ -2579,8 +2583,11 @@ void Category::update_value(RowSet &&rows, const std::string &tag, const std::st
if
(
childCat
->
mCatValidator
!=
nullptr
and
childCat
->
mCatValidator
->
mKeys
.
size
()
==
1
)
if
(
childCat
->
mCatValidator
!=
nullptr
and
childCat
->
mCatValidator
->
mKeys
.
size
()
==
1
)
{
{
auto
copy
=
childCat
->
copyRow
(
child
);
auto
copy
=
childCat
->
copyRow
(
child
);
if
(
copy
!=
child
)
if
(
copy
!=
child
)
{
process
.
push_back
(
child
);
process
.
push_back
(
child
);
continue
;
}
}
}
// cannot update this...
// cannot update this...
...
...
src/Compound.cpp
View file @
760e2369
...
@@ -721,13 +721,13 @@ void CompoundFactory::popDictionary()
...
@@ -721,13 +721,13 @@ void CompoundFactory::popDictionary()
const
Compound
*
CompoundFactory
::
create
(
std
::
string
id
)
const
Compound
*
CompoundFactory
::
create
(
std
::
string
id
)
{
{
static
bool
warned
=
false
;
//
static bool warned = false;
if
(
mImpl
and
warned
==
false
)
//
if (mImpl and warned == false)
{
//
{
std
::
cerr
<<
"Warning: no compound information library was found, resulting data may be incorrect or incomplete"
<<
std
::
endl
;
//
std::cerr << "Warning: no compound information library was found, resulting data may be incorrect or incomplete" << std::endl;
warned
=
true
;
//
warned = true;
}
//
}
return
mImpl
?
mImpl
->
get
(
id
)
:
nullptr
;
return
mImpl
?
mImpl
->
get
(
id
)
:
nullptr
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment