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
92bd52da
Unverified
Commit
92bd52da
authored
Mar 09, 2024
by
Maarten L. Hekkelman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
get that code compiling
parent
fb56a9cd
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
5 deletions
+5
-5
include/cif++/category.hpp
+1
-1
src/category.cpp
+3
-3
src/datablock.cpp
+1
-1
No files found.
include/cif++/category.hpp
View file @
92bd52da
...
@@ -182,7 +182,7 @@ class category
...
@@ -182,7 +182,7 @@ class category
/// @brief Update the links in this category
/// @brief Update the links in this category
/// @param db The enclosing @ref datablock
/// @param db The enclosing @ref datablock
void
update_links
(
datablock
&
db
);
void
update_links
(
const
datablock
&
db
);
/// @brief Return the global @ref validator for the data
/// @brief Return the global @ref validator for the data
/// @return The @ref validator or nullptr if not assigned
/// @return The @ref validator or nullptr if not assigned
...
...
src/category.cpp
View file @
92bd52da
...
@@ -666,7 +666,7 @@ void category::set_validator(const validator *v, datablock &db)
...
@@ -666,7 +666,7 @@ void category::set_validator(const validator *v, datablock &db)
update_links
(
db
);
update_links
(
db
);
}
}
void
category
::
update_links
(
datablock
&
db
)
void
category
::
update_links
(
const
datablock
&
db
)
{
{
m_child_links
.
clear
();
m_child_links
.
clear
();
m_parent_links
.
clear
();
m_parent_links
.
clear
();
...
@@ -675,7 +675,7 @@ void category::update_links(datablock &db)
...
@@ -675,7 +675,7 @@ void category::update_links(datablock &db)
{
{
for
(
auto
link
:
m_validator
->
get_links_for_parent
(
m_name
))
for
(
auto
link
:
m_validator
->
get_links_for_parent
(
m_name
))
{
{
auto
childCat
=
db
.
get
(
link
->
m_child_category
);
auto
childCat
=
const_cast
<
category
*>
(
db
.
get
(
link
->
m_child_category
)
);
if
(
childCat
==
nullptr
)
if
(
childCat
==
nullptr
)
continue
;
continue
;
m_child_links
.
emplace_back
(
childCat
,
link
);
m_child_links
.
emplace_back
(
childCat
,
link
);
...
@@ -683,7 +683,7 @@ void category::update_links(datablock &db)
...
@@ -683,7 +683,7 @@ void category::update_links(datablock &db)
for
(
auto
link
:
m_validator
->
get_links_for_child
(
m_name
))
for
(
auto
link
:
m_validator
->
get_links_for_child
(
m_name
))
{
{
auto
parentCat
=
db
.
get
(
link
->
m_parent_category
);
auto
parentCat
=
const_cast
<
category
*>
(
db
.
get
(
link
->
m_parent_category
)
);
if
(
parentCat
==
nullptr
)
if
(
parentCat
==
nullptr
)
continue
;
continue
;
m_parent_links
.
emplace_back
(
parentCat
,
link
);
m_parent_links
.
emplace_back
(
parentCat
,
link
);
...
...
src/datablock.cpp
View file @
92bd52da
...
@@ -109,7 +109,7 @@ bool datablock::validate_links() const
...
@@ -109,7 +109,7 @@ bool datablock::validate_links() const
bool
result
=
true
;
bool
result
=
true
;
for
(
auto
&
cat
:
*
this
)
for
(
auto
&
cat
:
*
this
)
c
at
.
update_links
(
*
this
);
c
onst_cast
<
category
&>
(
cat
)
.
update_links
(
*
this
);
for
(
auto
&
cat
:
*
this
)
for
(
auto
&
cat
:
*
this
)
result
=
cat
.
validate_links
()
and
result
;
result
=
cat
.
validate_links
()
and
result
;
...
...
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