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
a2f58501
Commit
a2f58501
authored
Nov 08, 2022
by
Maarten L. Hekkelman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avoid crash on empty branches
parent
283f4883
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
2 deletions
+6
-2
CMakeLists.txt
+0
-2
src/model.cpp
+6
-0
No files found.
CMakeLists.txt
View file @
a2f58501
...
@@ -35,8 +35,6 @@ include(CheckIncludeFiles)
...
@@ -35,8 +35,6 @@ include(CheckIncludeFiles)
include
(
CheckLibraryExists
)
include
(
CheckLibraryExists
)
include
(
CMakePackageConfigHelpers
)
include
(
CMakePackageConfigHelpers
)
include
(
CheckCXXSourceCompiles
)
include
(
CheckCXXSourceCompiles
)
# include(Dart)
include
(
AddGitSubmodule
)
include
(
AddGitSubmodule
)
set
(
CXX_EXTENSIONS OFF
)
set
(
CXX_EXTENSIONS OFF
)
...
...
src/model.cpp
View file @
a2f58501
...
@@ -1133,6 +1133,8 @@ branch::branch(structure &structure, const std::string &asym_id)
...
@@ -1133,6 +1133,8 @@ branch::branch(structure &structure, const std::string &asym_id)
void
branch
::
link_atoms
()
void
branch
::
link_atoms
()
{
{
if
(
not
empty
())
{
using
namespace
literals
;
using
namespace
literals
;
auto
&
db
=
m_structure
->
get_datablock
();
auto
&
db
=
m_structure
->
get_datablock
();
...
@@ -1151,6 +1153,7 @@ void branch::link_atoms()
...
@@ -1151,6 +1153,7 @@ void branch::link_atoms()
s1
.
set_link
(
s2
.
get_atom_by_atom_id
(
atom2
));
s1
.
set_link
(
s2
.
get_atom_by_atom_id
(
atom2
));
}
}
}
}
}
std
::
string
branch
::
name
()
const
std
::
string
branch
::
name
()
const
...
@@ -1375,6 +1378,9 @@ void structure::load_data()
...
@@ -1375,6 +1378,9 @@ void structure::load_data()
ri
->
second
->
add_atom
(
atom
);
ri
->
second
->
add_atom
(
atom
);
}
}
// what the ...
m_branches
.
erase
(
std
::
remove_if
(
m_branches
.
begin
(),
m_branches
.
end
(),
[](
const
branch
&
b
)
{
return
b
.
empty
();
}),
m_branches
.
end
());
for
(
auto
&
branch
:
m_branches
)
for
(
auto
&
branch
:
m_branches
)
branch
.
link_atoms
();
branch
.
link_atoms
();
}
}
...
...
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