Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
BornAgain
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mlz
BornAgain
Commits
3ee69e8e
Commit
3ee69e8e
authored
3 years ago
by
Wuttke, Joachim
Browse files
Options
Downloads
Patches
Plain Diff
no 'else' after 'return'; ASSERT, not throw, in impossible cases
parent
22e82fb1
No related branches found
No related tags found
1 merge request
!226
Annotations to GUIDomainSampleVisitor and other copy edits
Pipeline
#41991
passed
3 years ago
Stage: build
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
GUI/Models/GUIDomainSampleVisitor.cpp
+7
-12
7 additions, 12 deletions
GUI/Models/GUIDomainSampleVisitor.cpp
with
7 additions
and
12 deletions
GUI/Models/GUIDomainSampleVisitor.cpp
+
7
−
12
View file @
3ee69e8e
...
@@ -570,10 +570,8 @@ ExternalProperty GUIDomainSampleVisitor::createMaterialFromDomain(const Material
...
@@ -570,10 +570,8 @@ ExternalProperty GUIDomainSampleVisitor::createMaterialFromDomain(const Material
}
else
if
(
material
->
typeID
()
==
MATERIAL_TYPES
::
MaterialBySLD
)
{
}
else
if
(
material
->
typeID
()
==
MATERIAL_TYPES
::
MaterialBySLD
)
{
mat_item
=
m_materialModel
->
addSLDMaterial
(
materialName
,
material_data
.
real
(),
mat_item
=
m_materialModel
->
addSLDMaterial
(
materialName
,
material_data
.
real
(),
material_data
.
imag
());
material_data
.
imag
());
}
else
{
}
else
throw
Error
(
"GUI::Model::ObjectBuilder::createMaterialFromDomain() -> Error. "
ASSERT
(
0
);
"Unsupported material"
);
}
mat_item
->
setMagnetization
(
material
->
magnetization
());
mat_item
->
setMagnetization
(
material
->
magnetization
());
return
GUI
::
Model
::
MaterialItemUtils
::
materialProperty
(
*
mat_item
);
return
GUI
::
Model
::
MaterialItemUtils
::
materialProperty
(
*
mat_item
);
...
@@ -598,16 +596,13 @@ ParticleItem* GUIDomainSampleVisitor::CreateIParticle(SessionItem* parent,
...
@@ -598,16 +596,13 @@ ParticleItem* GUIDomainSampleVisitor::CreateIParticle(SessionItem* parent,
dynamic_cast
<
const
ParticleCoreShell
*>
(
m_itemToSample
[
parent
]);
dynamic_cast
<
const
ParticleCoreShell
*>
(
m_itemToSample
[
parent
]);
ASSERT
(
coreshell
);
ASSERT
(
coreshell
);
ParticleCoreShellItem
*
parentCoreShell
=
polymorphic_cast
<
ParticleCoreShellItem
*>
(
parent
);
ParticleCoreShellItem
*
parentCoreShell
=
polymorphic_cast
<
ParticleCoreShellItem
*>
(
parent
);
if
(
particle
==
coreshell
->
coreParticle
())
{
if
(
particle
==
coreshell
->
coreParticle
())
return
parentCoreShell
->
createCore
();
return
parentCoreShell
->
createCore
();
}
else
if
(
particle
==
coreshell
->
shellParticle
())
{
if
(
particle
==
coreshell
->
shellParticle
())
return
parentCoreShell
->
createShell
();
return
parentCoreShell
->
createShell
();
}
else
{
ASSERT
(
0
);
throw
Error
(
"GUI::Model::ObjectBuilder::InsertIParticle:"
}
"Particle not found in parent ParticleCoreShell"
);
return
m_sampleModel
->
insertItem
<
ParticleItem
>
(
parent
,
-
1
);
}
}
else
return
m_sampleModel
->
insertItem
<
ParticleItem
>
(
parent
,
-
1
);
}
}
// Used only in this file
// Used only in this file
...
...
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