mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-29 16:31:11 +02:00
gcc-6.2 compil fixes
This commit is contained in:
@@ -9,6 +9,9 @@
|
||||
#include <fcntl.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#if __cplusplus >= 201103
|
||||
#include <cmath>
|
||||
#endif
|
||||
#include <setjmp.h>
|
||||
#include "pictureviewer.h"
|
||||
|
||||
@@ -193,12 +196,21 @@ int fh_crw_load(const char *filename,unsigned char **buffer,int* xp,int* /*yp*/)
|
||||
ciptr->out_color_space=JCS_RGB;
|
||||
if(x==(int)ciptr->image_width)
|
||||
ciptr->scale_denom=1;
|
||||
#if __cplusplus < 201103
|
||||
else if(abs(x*2 - ciptr->image_width) < 2)
|
||||
ciptr->scale_denom=2;
|
||||
else if(abs(x*4 - ciptr->image_width) < 4)
|
||||
ciptr->scale_denom=4;
|
||||
else if(abs(x*8 - ciptr->image_width) < 8)
|
||||
ciptr->scale_denom=8;
|
||||
#else
|
||||
else if(std::abs(x*2 - ciptr->image_width) < 2)
|
||||
ciptr->scale_denom=2;
|
||||
else if(std::abs(x*4 - ciptr->image_width) < 4)
|
||||
ciptr->scale_denom=4;
|
||||
else if(std::abs(x*8 - ciptr->image_width) < 8)
|
||||
ciptr->scale_denom=8;
|
||||
#endif
|
||||
else
|
||||
ciptr->scale_denom=1;
|
||||
|
||||
|
@@ -4,7 +4,7 @@
|
||||
#include <config.h>
|
||||
#include "pv_config.h"
|
||||
#ifdef FBV_SUPPORT_JPEG
|
||||
|
||||
|
||||
#include <cstdio>
|
||||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
@@ -17,7 +17,10 @@
|
||||
#include <arpa/inet.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
|
||||
|
||||
#if __cplusplus >= 201103
|
||||
#include <cmath>
|
||||
#endif
|
||||
#include <setjmp.h>
|
||||
|
||||
#include <global.h>
|
||||
@@ -94,12 +97,21 @@ int fh_jpeg_load(const char *filename,unsigned char **buffer,int* x,int* y)
|
||||
ciptr->dct_method=JDCT_FASTEST;
|
||||
if(*x==(int)ciptr->image_width)
|
||||
ciptr->scale_denom=1;
|
||||
#if __cplusplus < 201103
|
||||
else if(abs(*x*2 - ciptr->image_width) < 2)
|
||||
ciptr->scale_denom=2;
|
||||
else if(abs(*x*4 - ciptr->image_width) < 4)
|
||||
ciptr->scale_denom=4;
|
||||
else if(abs(*x*8 - ciptr->image_width) < 8)
|
||||
ciptr->scale_denom=8;
|
||||
#else
|
||||
else if(std::abs(*x*2 - ciptr->image_width) < 2)
|
||||
ciptr->scale_denom=2;
|
||||
else if(std::abs(*x*4 - ciptr->image_width) < 4)
|
||||
ciptr->scale_denom=4;
|
||||
else if(std::abs(*x*8 - ciptr->image_width) < 8)
|
||||
ciptr->scale_denom=8;
|
||||
#endif
|
||||
else
|
||||
ciptr->scale_denom=1;
|
||||
|
||||
|
Reference in New Issue
Block a user