Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
cats
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Package registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
BDC
cats
Commits
10c8de56
Commit
10c8de56
authored
May 10, 2023
by
Andreas Gattringer
Browse files
Options
Downloads
Patches
Plain Diff
cats: fix resource overlay handling
parent
8e528f09
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/cats/actions/action_overlay_update.c
+3
-0
3 additions, 0 deletions
src/cats/actions/action_overlay_update.c
src/cats/overlays/overlays.c
+1
-0
1 addition, 0 deletions
src/cats/overlays/overlays.c
with
4 additions
and
0 deletions
src/cats/actions/action_overlay_update.c
+
3
−
0
View file @
10c8de56
...
...
@@ -75,6 +75,9 @@ bool overlay_update_needed(struct cats_configuration *conf, int32_t time, enum o
case
OL_HABITAT_TYPE_CC
:
if
(
conf
->
time
.
phase
!=
PHASE_SIMULATION
&&
conf
->
overlays
.
habitat_cc
==
NULL
)
return
true
;
break
;
case
OL_RESOURCE
:
if
(
conf
->
time
.
phase
!=
PHASE_SIMULATION
&&
conf
->
overlays
.
resources
==
NULL
)
return
true
;
break
;
case
OL_MAX
:
case
OL_NONE
:
return
false
;
...
...
This diff is collapsed.
Click to expand it.
src/cats/overlays/overlays.c
+
1
−
0
View file @
10c8de56
...
...
@@ -92,6 +92,7 @@ enum overlay_type get_overlay_type_from_name(const char *name, const struct stri
if
(
!
strcmp
(
name
,
"exclusion"
))
return
OL_EXCLUSION
;
if
(
!
strcmp
(
name
,
"habitat carrying capacity"
))
return
OL_HABITAT_TYPE_CC
;
if
(
!
strcmp
(
name
,
"resources"
))
return
OL_RESOURCE
;
if
(
registered_names
!=
NULL
)
{
for
(
int32_t
i
=
0
;
i
<
registered_names
->
count
;
i
++
)
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment