Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
flow-code
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
Container registry
Model registry
Operate
Environments
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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ians-nmh-siebert
extern
flow-code
Commits
b8660296
Commit
b8660296
authored
Mar 28, 2019
by
Hilb, Stephan
Browse files
Options
Downloads
Patches
Plain Diff
fix warnings
parent
ee350f15
No related branches found
No related tags found
No related merge requests found
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
color_flow.cpp
+1
-1
1 addition, 1 deletion
color_flow.cpp
imageLib/Image.cpp
+6
-2
6 additions, 2 deletions
imageLib/Image.cpp
imageLib/Image.h
+2
-0
2 additions, 0 deletions
imageLib/Image.h
imageLib/ImageIO.cpp
+4
-4
4 additions, 4 deletions
imageLib/ImageIO.cpp
with
13 additions
and
7 deletions
color_flow.cpp
+
1
−
1
View file @
b8660296
...
...
@@ -90,7 +90,7 @@ int main(int argc, char *argv[])
throw
CError
(
usage
,
argv
[
0
]);
}
catch
(
CError
&
err
)
{
fprintf
(
stderr
,
err
.
message
);
fprintf
(
stderr
,
"%s"
,
err
.
message
);
fprintf
(
stderr
,
"
\n
"
);
return
-
1
;
}
...
...
This diff is collapsed.
Click to expand it.
imageLib/Image.cpp
+
6
−
2
View file @
b8660296
...
...
@@ -83,10 +83,14 @@ void CImage::ReAllocate(CShape s, const type_info& ti, int bandSize,
void
CImage
::
ReAllocate
(
CShape
s
,
const
type_info
&
ti
,
int
bandSize
,
void
*
memory
,
bool
deleteWhenDone
,
int
rowSize
)
{
ReAllocate
(
s
,
&
ti
,
bandSize
,
memory
,
deleteWhenDone
,
rowSize
);
}
void
CImage
::
ReAllocate
(
CShape
s
,
const
type_info
*
ti
,
int
bandSize
,
void
*
memory
,
bool
deleteWhenDone
,
int
rowSize
)
{
// Set up the type_id, shape, and size info
m_shape
=
s
;
// image shape (dimensions)
m_pTI
=
&
ti
;
// pointer to type_info class
m_pTI
=
ti
;
// pointer to type_info class
m_bandSize
=
bandSize
;
// size of each band in bytes
m_pixSize
=
m_bandSize
*
s
.
nBands
;
// stride between pixels in bytes
...
...
@@ -107,7 +111,7 @@ void CImage::ReAllocate(CShape s, const type_info& ti, int bandSize,
void
CImage
::
DeAllocate
()
{
// Release the memory & set to default values
ReAllocate
(
CShape
(),
*
(
const
type_info
*
)
0
,
0
,
0
,
false
,
0
);
ReAllocate
(
CShape
(),
(
const
type_info
*
)
0
,
0
,
0
,
false
,
0
);
SetDefaults
();
}
...
...
This diff is collapsed.
Click to expand it.
imageLib/Image.h
+
2
−
0
View file @
b8660296
...
...
@@ -119,6 +119,8 @@ public:
CImage
(
CShape
s
,
const
type_info
&
ti
,
int
bandSize
);
// uses system-supplied copy constructor, assignment operator, and destructor
void
ReAllocate
(
CShape
s
,
const
type_info
*
ti
,
int
bandSize
,
void
*
memory
,
bool
deleteWhenDone
,
int
rowSize
);
void
ReAllocate
(
CShape
s
,
const
type_info
&
ti
,
int
bandSize
,
void
*
memory
,
bool
deleteWhenDone
,
int
rowSize
);
void
ReAllocate
(
CShape
s
,
const
type_info
&
ti
,
int
bandSize
,
...
...
This diff is collapsed.
Click to expand it.
imageLib/ImageIO.cpp
+
4
−
4
View file @
b8660296
...
...
@@ -74,11 +74,11 @@ const int TargaRawColormap = 1;
const
int
TargaRawRGB
=
2
;
const
int
TargaRawBW
=
3
;
const
int
TargaRunColormap
=
9
;
const
int
TargaRunRGB
=
10
;
[[
maybe_unused
]]
const
int
TargaRunRGB
=
10
;
const
int
TargaRunBW
=
11
;
// Descriptor fields
const
int
TargaAttrBits
=
15
;
[[
maybe_unused
]]
const
int
TargaAttrBits
=
15
;
const
int
TargaScreenOrigin
=
(
1
<<
5
);
const
int
TargaCMapSize
=
256
;
const
int
TargaCMapBands
=
3
;
...
...
@@ -151,7 +151,7 @@ void ReadFileTGA(CByteImage& img, const char* filename)
{
char
*
tmp
=
new
char
[
h
.
idLength
];
int
nread
=
(
int
)
fread
(
tmp
,
sizeof
(
uchar
),
h
.
idLength
,
stream
);
delete
tmp
;
// throw away this data
delete
[]
tmp
;
// throw away this data
if
(
nread
!=
h
.
idLength
)
throw
CError
(
"ReadFileTGA(%s): file is too short"
,
filename
);
}
...
...
@@ -358,7 +358,7 @@ void ReadFilePGM(CByteImage& img, const char* filename)
if
(
stream
==
0
)
throw
CError
(
"ReadFilePGM: could not open %s"
,
filename
);
int
width
,
height
,
nBands
;
int
width
=
0
,
height
=
0
,
nBands
=
0
;
const
char
*
dot
=
strrchr
(
filename
,
'.'
);
int
isGray
=
0
,
isFloat
=
0
;
...
...
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