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
5372133f
Commit
5372133f
authored
1 year ago
by
Wuttke, Joachim
Browse files
Options
Downloads
Patches
Plain Diff
recommended by clang-tidy
parent
dafa2b27
No related branches found
Branches containing commit
No related tags found
1 merge request
!2184
cleanup as suggested by clang-tidy
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
Device/IO/ReadWriteTiff.cpp
+2
-2
2 additions, 2 deletions
Device/IO/ReadWriteTiff.cpp
GUI/Model/Model/DatafilesTree.cpp
+1
-1
1 addition, 1 deletion
GUI/Model/Model/DatafilesTree.cpp
GUI/View/MaterialEditor/MaterialEditorDialog.cpp
+1
-1
1 addition, 1 deletion
GUI/View/MaterialEditor/MaterialEditorDialog.cpp
with
4 additions
and
4 deletions
Device/IO/ReadWriteTiff.cpp
+
2
−
2
View file @
5372133f
...
...
@@ -109,7 +109,7 @@ Datafield* Util::RW::readTiff(std::istream& input_stream)
if
(
buf_size
!=
expected_size
)
throw
std
::
runtime_error
(
"Cannot read TIFF file: wrong scanline size"
+
ref_to_doc
);
tdata_t
buf
=
_TIFFmalloc
(
buf_size
);
tdata_t
const
buf
=
_TIFFmalloc
(
buf_size
);
// tdata_t is void*
if
(
!
buf
)
throw
std
::
runtime_error
(
"Cannot read TIFF file: failed allocating buffer"
+
ref_to_doc
);
...
...
@@ -221,7 +221,7 @@ void Util::RW::writeTiff(const Datafield& data, std::ostream& output_stream)
for
(
unsigned
row
=
0
;
row
<
(
uint32_t
)
m_height
;
row
++
)
{
for
(
unsigned
col
=
0
;
col
<
line_buf
.
size
();
++
col
)
line_buf
[
col
]
=
static_cast
<
sample_t
>
(
data
[(
m_height
-
1
-
row
)
*
m_width
+
col
]);
memcpy
(
buf
,
&
line_buf
[
0
]
,
buf_size
);
memcpy
(
buf
,
line_buf
.
data
()
,
buf_size
);
if
(
TIFFWriteScanline
(
tiffstream
,
buf
,
row
)
<
0
)
throw
std
::
runtime_error
(
"Cannot write TIFF file: error in TIFFWriteScanline"
);
...
...
This diff is collapsed.
Click to expand it.
GUI/Model/Model/DatafilesTree.cpp
+
1
−
1
View file @
5372133f
...
...
@@ -174,7 +174,7 @@ QVariant DatafilesTree::data(const QModelIndex& index, int role) const
auto
*
const
item
=
itemForIndex
(
index
);
if
(
role
==
Qt
::
ToolTipRole
)
return
QString
()
;
return
{}
;
if
(
role
==
Qt
::
DisplayRole
)
return
item
->
realItemName
();
...
...
This diff is collapsed.
Click to expand it.
GUI/View/MaterialEditor/MaterialEditorDialog.cpp
+
1
−
1
View file @
5372133f
...
...
@@ -272,7 +272,7 @@ QString MaterialEditorDialog::chooseMaterial(QWidget* parent, SampleItem* sample
if
(
MaterialItem
*
material
=
dialog
.
currentMaterialItem
())
return
material
->
identifier
();
return
QString
()
;
return
{}
;
}
void
MaterialEditorDialog
::
addRefractiveMaterial
()
...
...
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