Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
dlib
Commits
32b0fc91
Commit
32b0fc91
authored
Jan 02, 2014
by
Davis King
Browse files
Added casts to avoid compiler warnings in visual studio 2013
parent
5f7b1849
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
dlib/external/libjpeg/jmemmgr.cpp
dlib/external/libjpeg/jmemmgr.cpp
+4
-4
No files found.
dlib/external/libjpeg/jmemmgr.cpp
View file @
32b0fc91
...
...
@@ -303,7 +303,7 @@ alloc_small (j_common_ptr cinfo, int pool_id, size_t sizeofobject)
if
(
slop
<
MIN_SLOP
)
/* give up when it gets real small */
out_of_memory
(
cinfo
,
2
);
/* jpeg_get_small failed */
}
mem
->
total_space_allocated
+=
min_request
+
slop
;
mem
->
total_space_allocated
+=
(
long
)(
min_request
+
slop
)
;
/* Success, initialize the new pool header and add to end of list */
hdr_ptr
->
hdr
.
next
=
NULL
;
hdr_ptr
->
hdr
.
bytes_used
=
0
;
...
...
@@ -363,7 +363,7 @@ alloc_large (j_common_ptr cinfo, int pool_id, size_t sizeofobject)
SIZEOF
(
large_pool_hdr
));
if
(
hdr_ptr
==
NULL
)
out_of_memory
(
cinfo
,
4
);
/* jpeg_get_large failed */
mem
->
total_space_allocated
+=
sizeofobject
+
SIZEOF
(
large_pool_hdr
);
mem
->
total_space_allocated
+=
(
long
)(
sizeofobject
+
SIZEOF
(
large_pool_hdr
)
)
;
/* Success, initialize the new pool header and add to list */
hdr_ptr
->
hdr
.
next
=
mem
->
large_list
[
pool_id
];
...
...
@@ -973,7 +973,7 @@ free_pool (j_common_ptr cinfo, int pool_id)
lhdr_ptr
->
hdr
.
bytes_left
+
SIZEOF
(
large_pool_hdr
);
jpeg_free_large
(
cinfo
,
(
void
FAR
*
)
lhdr_ptr
,
space_freed
);
mem
->
total_space_allocated
-=
space_freed
;
mem
->
total_space_allocated
-=
(
long
)
space_freed
;
lhdr_ptr
=
next_lhdr_ptr
;
}
...
...
@@ -987,7 +987,7 @@ free_pool (j_common_ptr cinfo, int pool_id)
shdr_ptr
->
hdr
.
bytes_left
+
SIZEOF
(
small_pool_hdr
);
jpeg_free_small
(
cinfo
,
(
void
*
)
shdr_ptr
,
space_freed
);
mem
->
total_space_allocated
-=
space_freed
;
mem
->
total_space_allocated
-=
(
long
)
space_freed
;
shdr_ptr
=
next_shdr_ptr
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment