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
c62abd76
Commit
c62abd76
authored
10 months ago
by
Wuttke, Joachim
Browse files
Options
Downloads
Patches
Plain Diff
Scale, Coord pass string and vector args the normal way (
#963
)
parent
f65dce94
No related branches found
Branches containing commit
No related tags found
1 merge request
!2570
use std::move only in special situations; normally pass arg as const ref (#963)
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
Base/Axis/Coordinate.cpp
+3
-3
3 additions, 3 deletions
Base/Axis/Coordinate.cpp
Base/Axis/Coordinate.h
+1
-1
1 addition, 1 deletion
Base/Axis/Coordinate.h
Base/Axis/Scale.cpp
+2
-2
2 additions, 2 deletions
Base/Axis/Scale.cpp
Base/Axis/Scale.h
+1
-1
1 addition, 1 deletion
Base/Axis/Scale.h
with
7 additions
and
7 deletions
Base/Axis/Coordinate.cpp
+
3
−
3
View file @
c62abd76
...
@@ -38,9 +38,9 @@ std::pair<std::string, std::string> parse_label(const std::string& label)
...
@@ -38,9 +38,9 @@ std::pair<std::string, std::string> parse_label(const std::string& label)
}
// namespace
}
// namespace
Coordinate
::
Coordinate
(
std
::
string
name
,
std
::
string
unit
)
Coordinate
::
Coordinate
(
const
std
::
string
&
name
,
const
std
::
string
&
unit
)
:
m_name
(
std
::
move
(
name
)
)
:
m_name
(
name
)
,
m_unit
(
std
::
move
(
unit
)
)
,
m_unit
(
unit
)
{
{
}
}
...
...
This diff is collapsed.
Click to expand it.
Base/Axis/Coordinate.h
+
1
−
1
View file @
c62abd76
...
@@ -26,7 +26,7 @@ public:
...
@@ -26,7 +26,7 @@ public:
{
{
}
}
Coordinate
(
const
std
::
string
&
label
);
Coordinate
(
const
std
::
string
&
label
);
Coordinate
(
std
::
string
name
,
std
::
string
unit
);
Coordinate
(
const
std
::
string
&
name
,
const
std
::
string
&
unit
);
bool
operator
==
(
const
Coordinate
&
other
)
const
=
default
;
bool
operator
==
(
const
Coordinate
&
other
)
const
=
default
;
...
...
This diff is collapsed.
Click to expand it.
Base/Axis/Scale.cpp
+
2
−
2
View file @
c62abd76
...
@@ -24,8 +24,8 @@
...
@@ -24,8 +24,8 @@
using
std
::
numbers
::
pi
;
using
std
::
numbers
::
pi
;
Scale
::
Scale
(
const
Coordinate
&
coord
,
std
::
vector
<
Bin1D
>
bins
)
Scale
::
Scale
(
const
Coordinate
&
coord
,
const
std
::
vector
<
Bin1D
>
&
bins
)
:
m_bins
(
std
::
move
(
bins
)
)
:
m_bins
(
bins
)
,
m_coord
(
std
::
make_unique
<
Coordinate
>
(
coord
))
,
m_coord
(
std
::
make_unique
<
Coordinate
>
(
coord
))
{
{
if
(
size
()
==
0
)
if
(
size
()
==
0
)
...
...
This diff is collapsed.
Click to expand it.
Base/Axis/Scale.h
+
1
−
1
View file @
c62abd76
...
@@ -29,7 +29,7 @@ using trafo_t = std::function<double(double)>;
...
@@ -29,7 +29,7 @@ using trafo_t = std::function<double(double)>;
class
Scale
{
class
Scale
{
public:
public:
Scale
(
const
Coordinate
&
coord
,
std
::
vector
<
Bin1D
>
bins
);
Scale
(
const
Coordinate
&
coord
,
const
std
::
vector
<
Bin1D
>
&
bins
);
Scale
(
const
Scale
&
other
);
Scale
(
const
Scale
&
other
);
Scale
*
clone
()
const
;
Scale
*
clone
()
const
;
...
...
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