declare tiff callbacks inline
This commit is contained in:
parent
cf4f775855
commit
9bf629c9b8
1 changed files with 20 additions and 22 deletions
|
@ -37,7 +37,7 @@ extern "C"
|
|||
|
||||
namespace mapnik {
|
||||
|
||||
static tsize_t tiff_write_proc(thandle_t fd, tdata_t buf, tsize_t size)
|
||||
static inline tsize_t tiff_write_proc(thandle_t fd, tdata_t buf, tsize_t size)
|
||||
{
|
||||
std::ostream* out = reinterpret_cast<std::ostream*>(fd);
|
||||
std::ios::pos_type pos = out->tellp();
|
||||
|
@ -56,7 +56,7 @@ static tsize_t tiff_write_proc(thandle_t fd, tdata_t buf, tsize_t size)
|
|||
}
|
||||
}
|
||||
|
||||
static toff_t tiff_seek_proc(thandle_t fd, toff_t off, int whence)
|
||||
static inline toff_t tiff_seek_proc(thandle_t fd, toff_t off, int whence)
|
||||
{
|
||||
std::ostream* out = reinterpret_cast<std::ostream*>(fd);
|
||||
|
||||
|
@ -125,14 +125,14 @@ static toff_t tiff_seek_proc(thandle_t fd, toff_t off, int whence)
|
|||
return static_cast<toff_t>(out->tellp());
|
||||
}
|
||||
|
||||
static int tiff_close_proc(thandle_t fd)
|
||||
static inline int tiff_close_proc(thandle_t fd)
|
||||
{
|
||||
std::ostream* out = (std::ostream*)fd;
|
||||
out->flush();
|
||||
return 0;
|
||||
}
|
||||
|
||||
static toff_t tiff_size_proc(thandle_t fd)
|
||||
static inline toff_t tiff_size_proc(thandle_t fd)
|
||||
{
|
||||
std::ostream* out = reinterpret_cast<std::ostream*>(fd);
|
||||
std::ios::pos_type pos = out->tellp();
|
||||
|
@ -142,16 +142,14 @@ static toff_t tiff_size_proc(thandle_t fd)
|
|||
return static_cast<toff_t>(len);
|
||||
}
|
||||
|
||||
static tsize_t tiff_dummy_read_proc(thandle_t , tdata_t , tsize_t)
|
||||
static inline tsize_t tiff_dummy_read_proc(thandle_t , tdata_t , tsize_t)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void tiff_dummy_unmap_proc(thandle_t , tdata_t , toff_t)
|
||||
{
|
||||
}
|
||||
static inline void tiff_dummy_unmap_proc(thandle_t , tdata_t , toff_t) {}
|
||||
|
||||
static int tiff_dummy_map_proc(thandle_t , tdata_t*, toff_t* )
|
||||
static inline int tiff_dummy_map_proc(thandle_t , tdata_t*, toff_t* )
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue