/*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
// The following values will get calculated at compile time
const float DEFAULT_FRAME_DURATION_IN_SECONDS( 1.0f / 60.0f );
-const unsigned int DEFAULT_FRAME_DURATION_IN_MILLISECONDS( DEFAULT_FRAME_DURATION_IN_SECONDS * MILLISECONDS_PER_SECOND );
-const unsigned int DEFAULT_FRAME_DURATION_IN_NANOSECONDS( DEFAULT_FRAME_DURATION_IN_SECONDS * NANOSECONDS_PER_SECOND );
+const uint64_t DEFAULT_FRAME_DURATION_IN_MILLISECONDS( DEFAULT_FRAME_DURATION_IN_SECONDS * MILLISECONDS_PER_SECOND );
+const uint64_t DEFAULT_FRAME_DURATION_IN_NANOSECONDS( DEFAULT_FRAME_DURATION_IN_SECONDS * NANOSECONDS_PER_SECOND );
/**
* Handles the use case when an update-request is received JUST before we process a sleep-request. If we did not have an update-request count then
{
// Not protected by lock, but written to rarely so not worth adding a lock when reading
mDefaultFrameDelta = numberOfFramesPerRender * DEFAULT_FRAME_DURATION_IN_SECONDS;
- mDefaultFrameDurationMilliseconds = (uint64_t)numberOfFramesPerRender * DEFAULT_FRAME_DURATION_IN_MILLISECONDS;
- mDefaultFrameDurationNanoseconds = (uint64_t)numberOfFramesPerRender * DEFAULT_FRAME_DURATION_IN_NANOSECONDS;
- mDefaultHalfFrameNanoseconds = mDefaultFrameDurationNanoseconds / 2;
+ mDefaultFrameDurationMilliseconds = uint64_t( numberOfFramesPerRender ) * DEFAULT_FRAME_DURATION_IN_MILLISECONDS;
+ mDefaultFrameDurationNanoseconds = uint64_t( numberOfFramesPerRender ) * DEFAULT_FRAME_DURATION_IN_NANOSECONDS;
+ mDefaultHalfFrameNanoseconds = mDefaultFrameDurationNanoseconds / 2u;
LOG_EVENT( "mDefaultFrameDelta(%.6f), mDefaultFrameDurationMilliseconds(%lld), mDefaultFrameDurationNanoseconds(%lld)", mDefaultFrameDelta, mDefaultFrameDurationMilliseconds, mDefaultFrameDurationNanoseconds );
}
/*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
{
Integration::Log::LogMessage( Dali::Integration::Log::DebugInfo,
"%.6f (seconds), %s\n",
- (float)( marker.GetTimeStamp().microseconds * MICROSECONDS_TO_SECOND ),
- description);
+ float( marker.GetTimeStamp().microseconds ) * MICROSECONDS_TO_SECOND,
+ description );
}
}
/*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
mLastSyncFrameNumber = frameNumber;
- DALI_LOG_INFO( gLogFilter, Debug::General, "FrameTime: SetSyncTime(): Frame: %u: Time: %u\n", mLastSyncFrameNumber, (unsigned int) ( mLastSyncTime / MICROSECONDS_PER_MILLISECOND ) );
+ DALI_LOG_INFO( gLogFilter, Debug::General, "FrameTime: SetSyncTime(): Frame: %u: Time: %u\n", mLastSyncFrameNumber, static_cast<unsigned int>( mLastSyncTime / MICROSECONDS_PER_MILLISECOND ) );
}
}
/*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
#include "ecore-callback-manager.h"
// EXTERNAL INCLUDES
+// Ecore is littered with C style cast
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wold-style-cast"
#include <Ecore.h>
#include <dali/integration-api/debug.h>
} // namespace Internal
} // namespace Dali
+
+#pragma GCC diagnostic pop
/*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
#include "file-descriptor-monitor.h"
// EXTERNAL INCLUDES
+// Ecore is littered with C style cast
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wold-style-cast"
#include <Ecore.h>
// INTERNAL INCLUDES
} // namespace Internal
} // namespace Dali
+
+#pragma GCC diagnostic pop
/*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
#include "timer-impl.h"
// EXTERNAL INCLUDES
+// Ecore is littered with C style cast
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wold-style-cast"
#include <Ecore.h>
namespace Dali
} // namespace Internal
} // namespace Dali
+
+#pragma GCC diagnostic pop
/*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
}
}
- return (void*)eglImage;
+ return eglImage;
}
void EglImageExtensions::DestroyImageKHR(void* eglImageKHR)
GLint glError = glGetError();
#endif
- glEGLImageTargetTexture2DOESProc(GL_TEXTURE_2D, (GLeglImageOES)eglImage);
+ glEGLImageTargetTexture2DOESProc(GL_TEXTURE_2D, reinterpret_cast< GLeglImageOES >( eglImage ) );
#ifdef EGL_ERROR_CHECKING
glError = glGetError();
// avoid trying to reload extended KHR functions, if it fails the first time
if( ! mImageKHRInitializeFailed )
{
- eglCreateImageKHRProc = (PFNEGLCREATEIMAGEKHRPROC) eglGetProcAddress("eglCreateImageKHR"); /* parasoft-suppress MISRA2004-11_1_DMC "Using EGL defined functions." */
- eglDestroyImageKHRProc = (PFNEGLDESTROYIMAGEKHRPROC) eglGetProcAddress("eglDestroyImageKHR"); /* parasoft-suppress MISRA2004-11_1_DMC "Using EGL defined functions." */
- glEGLImageTargetTexture2DOESProc = (PFNGLEGLIMAGETARGETTEXTURE2DOESPROC) eglGetProcAddress("glEGLImageTargetTexture2DOES"); /* parasoft-suppress MISRA2004-11_1_DMC "Using EGL defined functions." */
+ eglCreateImageKHRProc = reinterpret_cast< PFNEGLCREATEIMAGEKHRPROC >( eglGetProcAddress("eglCreateImageKHR") );
+ eglDestroyImageKHRProc = reinterpret_cast< PFNEGLDESTROYIMAGEKHRPROC >( eglGetProcAddress("eglDestroyImageKHR") );
+ glEGLImageTargetTexture2DOESProc = reinterpret_cast< PFNGLEGLIMAGETARGETTEXTURE2DOESPROC >( eglGetProcAddress("glEGLImageTargetTexture2DOES") );
}
if (eglCreateImageKHRProc && eglDestroyImageKHRProc && glEGLImageTargetTexture2DOESProc)
/*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
{
if( ! mSyncInitializeFailed )
{
- eglCreateSyncKHR = (PFNEGLCREATESYNCKHRPROC)eglGetProcAddress("eglCreateSyncKHR");
- eglClientWaitSyncKHR = (PFNEGLCLIENTWAITSYNCKHRPROC)eglGetProcAddress("eglClientWaitSyncKHR");
- eglDestroySyncKHR = (PFNEGLDESTROYSYNCKHRPROC)eglGetProcAddress("eglDestroySyncKHR");
+ eglCreateSyncKHR = reinterpret_cast< PFNEGLCREATESYNCKHRPROC >( eglGetProcAddress("eglCreateSyncKHR") );
+ eglClientWaitSyncKHR = reinterpret_cast< PFNEGLCLIENTWAITSYNCKHRPROC >( eglGetProcAddress("eglClientWaitSyncKHR") );
+ eglDestroySyncKHR = reinterpret_cast< PFNEGLDESTROYSYNCKHRPROC >( eglGetProcAddress("eglDestroySyncKHR") );
}
if( eglCreateSyncKHR && eglClientWaitSyncKHR && eglDestroySyncKHR )
/*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
mInitialized = true;
#ifdef GL_EXT_discard_framebuffer
- mGlDiscardFramebuffer = (PFNGLDISCARDFRAMEBUFFEREXTPROC) eglGetProcAddress("glDiscardFramebufferEXT");
+ mGlDiscardFramebuffer = reinterpret_cast< PFNGLDISCARDFRAMEBUFFEREXTPROC >( eglGetProcAddress("glDiscardFramebufferEXT") );
#endif
#ifdef GL_OES_get_program_binary
- mGlGetProgramBinaryOES = (PFNGLGETPROGRAMBINARYOESPROC) eglGetProcAddress("glGetProgramBinaryOES");
- mGlProgramBinaryOES = (PFNGLPROGRAMBINARYOESPROC) eglGetProcAddress("glProgramBinaryOES");
+ mGlGetProgramBinaryOES = reinterpret_cast< PFNGLGETPROGRAMBINARYOESPROC >( eglGetProcAddress("glGetProgramBinaryOES") );
+ mGlProgramBinaryOES = reinterpret_cast< PFNGLPROGRAMBINARYOESPROC >( eglGetProcAddress("glProgramBinaryOES") );
#endif
}
/*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
serverAddress.sin_addr.s_addr = htonl( INADDR_ANY ); // binds the socket to all available interfaces
int ret = bind( mSocketFileDescriptor,
- (struct sockaddr* ) &serverAddress,
+ reinterpret_cast< struct sockaddr* >( &serverAddress ),
sizeof(serverAddress));
if( ret == -1 )
/*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
float Orientation::GetRadians() const
{
- return Math::PI * (float)mOrientation / 180.0f;
+ return Math::PI * float(mOrientation) / 180.0f;
}
Orientation::OrientationSignalType& Orientation::ChangedSignal()
/*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
char *GifExtension,
GraphicsControlBlock *GCB)
{
- if (GifExtensionLength != 4) {
+ if (GifExtensionLength != 4)
+ {
return GIF_ERROR;
}
GCB->UserInputFlag = (GifExtension[0] & 0x02) != 0;
GCB->DelayTime = UNSIGNED_LITTLE_ENDIAN(GifExtension[1], GifExtension[2]);
if (GifExtension[0] & 0x01)
- GCB->TransparentColor = ((int)GifExtension[3]+256)%256;
+ {
+ GCB->TransparentColor = reinterpret_cast< int >( GifExtension[3]+256 ) % 256;
+ }
else
+ {
GCB->TransparentColor = NO_TRANSPARENT_COLOR;
+ }
return GIF_OK;
}
/*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
#include "ecore-indicator-impl.h"
// EXTERNAL INCLUDES
+// Ecore is littered with C style cast
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wold-style-cast"
#include <Ecore.h>
#include <Evas.h>
#ifdef WAYLAND
}
} // Adaptor
+
} // Internal
+
} // Dali
+
+#pragma GCC diagnostic pop
/*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
#include "ecore-server-connection.h"
// EXTERNAL INCLUDES
+// Ecore is littered with C style cast
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wold-style-cast"
#include <Ecore.h>
#include <dali/integration-api/debug.h>
}
} // Adaptor
+
} // Internal
+
} // Dali
+
+#pragma GCC diagnostic pop
\ No newline at end of file
/*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
#include <dali/integration-api/debug.h>
// INTERNAL INCLUDES
+// Ecore is littered with C style cast
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wold-style-cast"
#include "ecore-virtual-keyboard.h"
#include <adaptor.h>
#include <locale-utils.h>
} // namespace Internal
} // namespace Dali
+
+#pragma GCC diagnostic pop
/*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
#include "clipboard-impl.h"
// EXTERNAL INCLUDES
+// Ecore is littered with C style cast
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wold-style-cast"
#include <Ecore.h>
#include <Ecore_Wayland.h>
#include <dali/public-api/object/any.h>
} // namespace Internal
} // namespace Dali
+
+#pragma GCC diagnostic pop
/*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
#include <events/event-handler.h>
// EXTERNAL INCLUDES
+// Ecore is littered with C style cast
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wold-style-cast"
#include <Ecore.h>
#include <Ecore_Input.h>
#include <ecore-wl-render-surface.h>
} // namespace Internal
} // namespace Dali
+
+#pragma GCC diagnostic pop
/*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
*/
// CLASS HEADER
+// Ecore is littered with C style cast
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wold-style-cast"
#include <imf-manager-impl.h>
// EXTERNAL INCLUDES
void ImfManager::NotifyTextInputMultiLine( bool multiLine )
{
Ecore_IMF_Input_Hints currentHint = ecore_imf_context_input_hint_get(mIMFContext);
- ecore_imf_context_input_hint_set(mIMFContext, (Ecore_IMF_Input_Hints)(multiLine ?
- (currentHint | ECORE_IMF_INPUT_HINT_MULTILINE) :
- (currentHint & ~ECORE_IMF_INPUT_HINT_MULTILINE)));
+ ecore_imf_context_input_hint_set( mIMFContext,
+ static_cast< Ecore_IMF_Input_Hints >( multiLine ?
+ (currentHint | ECORE_IMF_INPUT_HINT_MULTILINE) :
+ (currentHint & ~ECORE_IMF_INPUT_HINT_MULTILINE)));
}
Dali::ImfManager::TextDirection ImfManager::GetTextDirection()
} // Internal
} // Dali
+
+#pragma GCC diagnostic pop
#include <window-impl.h>
// EXTERNAL HEADERS
+// Ecore is littered with C style cast
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wold-style-cast"
#include <Ecore.h>
#include <Ecore_Wayland.h>
#include <tizen-extension-client-protocol.h>
}
} // Adaptor
+
} // Internal
+
} // Dali
+
+#pragma GCC diagnostic pop
/*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
// create the EGL surface
ecore_wl_window_surface_create(mWlWindow);
mEglWindow = wl_egl_window_create(ecore_wl_window_surface_get(mWlWindow), mPosition.width, mPosition.height);
- eglImpl.CreateSurfaceWindow( (EGLNativeWindowType)mEglWindow, mColorDepth ); // reinterpret_cast does not compile
+ EGLNativeWindowType windowType( mEglWindow );
+ eglImpl.CreateSurfaceWindow( windowType, mColorDepth );
}
void WindowRenderSurface::DestroyEglSurface( EglInterface& eglIf )
mEglWindow = wl_egl_window_create(ecore_wl_window_surface_get(mWlWindow), mPosition.width, mPosition.height);
Internal::Adaptor::EglImplementation& eglImpl = static_cast<Internal::Adaptor::EglImplementation&>( egl );
- return eglImpl.ReplaceSurfaceWindow( (EGLNativeWindowType)mEglWindow ); // reinterpret_cast does not compile
+ EGLNativeWindowType windowType( mEglWindow );
+ return eglImpl.ReplaceSurfaceWindow( windowType );
}
void WindowRenderSurface::MoveResize( Dali::PositionSize positionSize )
if ( mWlWindow == 0 )
{
- DALI_ASSERT_ALWAYS(0 && "Failed to create X window");
+ DALI_ASSERT_ALWAYS(0 && "Failed to create Wayland window");
}
}
/*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
#include "system-settings.h"
#ifndef WAYLAND
-#define MSG_DOMAIN_CONTROL_ACCESS (int)ECORE_X_ATOM_E_ILLUME_ACCESS_CONTROL
+#define MSG_DOMAIN_CONTROL_ACCESS static_cast< int >( ECORE_X_ATOM_E_ILLUME_ACCESS_CONTROL )
#endif
namespace Dali
vconf_get_bool( VCONFKEY_SETAPPL_ACCESSIBILITY_TTS, &isEnabled );
}
- return (bool)isEnabled;
+ return bool( isEnabled );
}
/*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
EGLNativeDisplayType DisplayConnection::GetNativeDisplay()
{
- return (EGLNativeDisplayType)tbm_bufmgr_init( -1 );
+ return reinterpret_cast< EGLNativeDisplayType >( tbm_bufmgr_init( -1 ) );
}
void DisplayConnection::ReleaseNativeDisplay()
{
if( mDisplay )
{
- tbm_bufmgr_deinit( (tbm_bufmgr)mDisplay );
+ tbm_bufmgr_deinit( reinterpret_cast< tbm_bufmgr >( mDisplay ) );
}
}
/*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
}
}
- return (void*)eglImage;
+ return eglImage;
}
void EglImageExtensions::DestroyImageKHR(void* eglImageKHR)
GLint glError = glGetError();
#endif
- glEGLImageTargetTexture2DOESProc(GL_TEXTURE_EXTERNAL_OES, (GLeglImageOES)eglImage);
+ glEGLImageTargetTexture2DOESProc(GL_TEXTURE_EXTERNAL_OES, reinterpret_cast< GLeglImageOES >( eglImage ) );
#ifdef EGL_ERROR_CHECKING
glError = glGetError();
// avoid trying to reload extended KHR functions, if it fails the first time
if( ! mImageKHRInitializeFailed )
{
- eglCreateImageKHRProc = (PFNEGLCREATEIMAGEKHRPROC) eglGetProcAddress("eglCreateImageKHR"); /* parasoft-suppress MISRA2004-11_1_DMC "Using EGL defined functions." */
- eglDestroyImageKHRProc = (PFNEGLDESTROYIMAGEKHRPROC) eglGetProcAddress("eglDestroyImageKHR"); /* parasoft-suppress MISRA2004-11_1_DMC "Using EGL defined functions." */
- glEGLImageTargetTexture2DOESProc = (PFNGLEGLIMAGETARGETTEXTURE2DOESPROC) eglGetProcAddress("glEGLImageTargetTexture2DOES"); /* parasoft-suppress MISRA2004-11_1_DMC "Using EGL defined functions." */
+ eglCreateImageKHRProc = reinterpret_cast< PFNEGLCREATEIMAGEKHRPROC >( eglGetProcAddress("eglCreateImageKHR") );
+ eglDestroyImageKHRProc = reinterpret_cast< PFNEGLDESTROYIMAGEKHRPROC >( eglGetProcAddress("eglDestroyImageKHR") );
+ glEGLImageTargetTexture2DOESProc = reinterpret_cast< PFNGLEGLIMAGETARGETTEXTURE2DOESPROC >( eglGetProcAddress("glEGLImageTargetTexture2DOES") );
}
if (eglCreateImageKHRProc && eglDestroyImageKHRProc && glEGLImageTargetTexture2DOESProc)
/*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Internal::Adaptor::EglImplementation& eglImpl = static_cast<Internal::Adaptor::EglImplementation&>( egl );
- eglImpl.CreateSurfaceWindow( (EGLNativeWindowType)mImpl->mTbmQueue, mImpl->mColorDepth );
+ eglImpl.CreateSurfaceWindow( reinterpret_cast< EGLNativeWindowType >( mImpl->mTbmQueue ), mImpl->mColorDepth );
}
void NativeRenderSurface::DestroyEglSurface( EglInterface& egl )
Internal::Adaptor::EglImplementation& eglImpl = static_cast<Internal::Adaptor::EglImplementation&>( egl );
- return eglImpl.ReplaceSurfaceWindow( (EGLNativeWindowType)mImpl->mTbmQueue ); // reinterpret_cast does not compile
+ return eglImpl.ReplaceSurfaceWindow( reinterpret_cast< EGLNativeWindowType >( mImpl->mTbmQueue ) );
}
void NativeRenderSurface::StartRender()
/*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
#ifdef SENSOR_ENABLED
static void sensor_changed_cb (sensor_h sensor, sensor_event_s *event, void *user_data)
{
- TiltSensor* tiltSensor = (TiltSensor*)user_data;
+ TiltSensor* tiltSensor = reinterpret_cast< TiltSensor* >( user_data );
if(tiltSensor)
{
/*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
#include <events/event-handler.h>
// EXTERNAL INCLUDES
+// Ecore is littered with C style cast
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wold-style-cast"
#include <Ecore.h>
#include <Ecore_Input.h>
#include <Ecore_X.h>
} // namespace Internal
} // namespace Dali
+
+#pragma GCC diagnostic pop
/*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
LONG_MAX, // long length of data to retrieve
False, // Bool flag to delete data
ecore_x_window_prop_any_type(), // Atom atom id associated to property type
- (Atom *)&typeRet, // Atom actual_type_return, atom id property type
+ reinterpret_cast< Atom * >( &typeRet ), // Atom actual_type_return, atom id property type
&sizeRet, // int* format of property
&numRet, // unsigned long* number of items being returned in prop_return
&bytes, // unsigned long* remaining bytes if partial retrieval
{
for ( i = 0; i < numRet; i++ )
{
- data += ( ( unsigned short * )propRet )[i];
+ data += ( propRet )[i];
}
}
break;
{
for ( i = 0; i < numRet; i++ )
{
- data += ( ( unsigned long * )propRet )[i];
+ data += ( propRet )[i];
}
}
break;
message.window = window;
snprintf(message.data.b, 20, "%s", msg);
- XSendEvent( static_cast<Display*>( display ), window, propagate, eventMask,( XEvent* )&message );
+ XSendEvent( static_cast<Display*>( display ), window, propagate, eventMask, reinterpret_cast< XEvent* >( &message ) );
}
#include <locale-utils.h>
#include <singleton-service-impl.h>
#include <virtual-keyboard-impl.h>
+// Ecore is littered with C style cast
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wold-style-cast"
#include "ecore-virtual-keyboard.h"
namespace Dali
} // Internal
} // Dali
+
+#pragma GCC diagnostic pop
/*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
int x, y;
// get the width, height and depth
- ecore_x_pixmap_geometry_get(mPixmap, &x, &y, (int*)&mWidth, (int*)&mHeight);
+ ecore_x_pixmap_geometry_get( mPixmap, &x, &y, reinterpret_cast< int* >( &mWidth ), reinterpret_cast< int* >( &mHeight ) );
// set whether blending is required according to pixel format based on the depth
/* default pixel format is RGB888
/*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
// make a fixes region as updated area
region = XFixesCreateRegion( display, &rect, 1 );
// add damage event to updated drawable
- XDamageAdd( display, (Drawable)drawable, region );
+ Drawable xdrawable( drawable ); // ecore type is unsigned int whereas in 64bit linux Drawable is long unsigned int
+ XDamageAdd( display, xdrawable, region );
XFixesDestroyRegion( display, region );
XFlush( display );
/*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
nativeWindow.Get(ecoreWindow);
ecore_x_window_prop_property_set( ecoreWindow, ECORE_X_ATOM_E_WINDOW_AUX_HINT,
ECORE_X_ATOM_STRING, 8,
- (void*)ss.str().c_str(), ss.str().size() + 1 );
+ ss.str().c_str(), ss.str().size() + 1 );
}
bool IsEffectEnabled( Window window )
#include "window-impl.h"
// EXTERNAL HEADERS
+// Ecore is littered with C style cast
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wold-style-cast"
#include <Ecore.h>
#include <Ecore_X.h>
}
} // Adaptor
+
} // Internal
+
} // Dali
+
+#pragma GCC diagnostic pop
/*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Ecore_X_Drawable WindowRenderSurface::GetDrawable()
{
// already an e-core type
- return (Ecore_X_Drawable)mX11Window;
+ return static_cast< Ecore_X_Drawable >( mX11Window );
}
Any WindowRenderSurface::GetSurface()
Internal::Adaptor::EglImplementation& eglImpl = static_cast<Internal::Adaptor::EglImplementation&>( eglIf );
// create the EGL surface
- // need to cast to X handle as in 64bit system ECore handle is 32 bit whereas EGLnative and XWindow are 64 bit
- XWindow window = static_cast< XWindow>( mX11Window );
- eglImpl.CreateSurfaceWindow( (EGLNativeWindowType)window, mColorDepth ); // reinterpret_cast does not compile
+ // need to create X handle as in 64bit system ECore handle is 32 bit whereas EGLnative and XWindow are 64 bit
+ XWindow window( mX11Window );
+ eglImpl.CreateSurfaceWindow( reinterpret_cast< EGLNativeWindowType >( window ), mColorDepth );
}
void WindowRenderSurface::DestroyEglSurface( EglInterface& eglIf )
{
DALI_LOG_TRACE_METHOD( gRenderSurfaceLogFilter );
- // need to cast to X handle as in 64bit system ECore handle is 32 bit whereas EGLnative and XWindow are 64 bit
- XWindow window = static_cast< XWindow >( mX11Window );
+ // need to create X handle as in 64bit system ECore handle is 32 bit whereas EGLnative and XWindow are 64 bit
+ XWindow window( mX11Window );
Internal::Adaptor::EglImplementation& eglImpl = static_cast<Internal::Adaptor::EglImplementation&>( egl );
- return eglImpl.ReplaceSurfaceWindow( (EGLNativeWindowType)window ); // reinterpret_cast does not compile
+ return eglImpl.ReplaceSurfaceWindow( reinterpret_cast< EGLNativeWindowType >( window ) );
}
void WindowRenderSurface::MoveResize( Dali::PositionSize positionSize )
-DTIZEN_PLATFORM_CONFIG_SUPPORTED=${tizenPlatformConfigSupported} \
-DNON_POWER_OF_TWO_TEXTURES \
-DDALI_COMPILATION -DDALI_ADAPTOR_COMPILATION \
- -Werror -Wall -lgcc \
+ -Werror -Wall -lgcc -Wold-style-cast\
$(libdali_adaptor_la_includes) \
$(DALI_ADAPTOR_CFLAGS) \
$(DALICORE_CFLAGS) \
/*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
DALI_ASSERT_DEBUG( scanline2 && "Null pointer." );
DALI_ASSERT_DEBUG( outputScanline && "Null pointer." );
DALI_ASSERT_DEBUG( ((scanline1 >= scanline2 + widthInComponents) || (scanline2 >= scanline1 + widthInComponents )) && "Scanlines alias." );
- DALI_ASSERT_DEBUG( ((((void*)outputScanline) >= (void*)(scanline2 + widthInComponents)) || (((void*)scanline2) >= (void*)(scanline1 + widthInComponents))) && "Scanline 2 aliases output." );
+ DALI_ASSERT_DEBUG( ((outputScanline >= (scanline2 + widthInComponents)) || (scanline2 >= (scanline1 + widthInComponents))) && "Scanline 2 aliases output." );
}
/**
DALI_ASSERT_DEBUG( ((desiredWidth <= inputWidth && desiredHeight <= inputHeight) ||
outPixels >= inPixels + inputWidth * inputHeight * sizeof(PIXEL) || outPixels <= inPixels - desiredWidth * desiredHeight * sizeof(PIXEL)) &&
"The input and output buffers must not overlap for an upscaling.");
- DALI_ASSERT_DEBUG( ((uint64_t) inPixels) % sizeof(PIXEL) == 0 && "Pixel pointers need to be aligned to the size of the pixels (E.g., 4 bytes for RGBA, 2 bytes for RGB565, ...)." );
- DALI_ASSERT_DEBUG( ((uint64_t) outPixels) % sizeof(PIXEL) == 0 && "Pixel pointers need to be aligned to the size of the pixels (E.g., 4 bytes for RGBA, 2 bytes for RGB565, ...)." );
+ DALI_ASSERT_DEBUG( reinterpret_cast< uint64_t >( inPixels ) % sizeof(PIXEL) == 0 && "Pixel pointers need to be aligned to the size of the pixels (E.g., 4 bytes for RGBA, 2 bytes for RGB565, ...)." );
+ DALI_ASSERT_DEBUG( reinterpret_cast< uint64_t >( outPixels ) % sizeof(PIXEL) == 0 && "Pixel pointers need to be aligned to the size of the pixels (E.g., 4 bytes for RGBA, 2 bytes for RGB565, ...)." );
if( inputWidth < 1u || inputHeight < 1u || desiredWidth < 1u || desiredHeight < 1u )
{
"Input and output buffers cannot overlap.");
if( DEBUG_ASSERT_ALIGNMENT )
{
- DALI_ASSERT_DEBUG( ((uint64_t) inPixels) % sizeof(PIXEL) == 0 && "Pixel pointers need to be aligned to the size of the pixels (E.g., 4 bytes for RGBA, 2 bytes for RGB565, ...)." );
- DALI_ASSERT_DEBUG( ((uint64_t) outPixels) % sizeof(PIXEL) == 0 && "Pixel pointers need to be aligned to the size of the pixels (E.g., 4 bytes for RGBA, 2 bytes for RGB565, ...)." );
+ DALI_ASSERT_DEBUG( reinterpret_cast< uint64_t >( inPixels ) % sizeof(PIXEL) == 0 && "Pixel pointers need to be aligned to the size of the pixels (E.g., 4 bytes for RGBA, 2 bytes for RGB565, ...)." );
+ DALI_ASSERT_DEBUG( reinterpret_cast< uint64_t >( outPixels) % sizeof(PIXEL) == 0 && "Pixel pointers need to be aligned to the size of the pixels (E.g., 4 bytes for RGBA, 2 bytes for RGB565, ...)." );
}
if( inputWidth < 1u || inputHeight < 1u || desiredWidth < 1u || desiredHeight < 1u )
* @param[out] fileHeader This will be populated with the header data
* @return True if the file is valid, false otherwise
*/
-bool LoadAstcHeader( FILE * const filePointer, unsigned int &width, unsigned int &height, AstcFileHeader &fileHeader )
+bool LoadAstcHeader( FILE * const filePointer, unsigned int& width, unsigned int& height, AstcFileHeader& fileHeader )
{
// Pull the bytes of the file header in as a block:
- unsigned int readLength = sizeof( AstcFileHeader );
- if( fread( (void*)&fileHeader, 1, readLength, filePointer ) != readLength )
+ const unsigned int readLength = sizeof( AstcFileHeader );
+ if( fread( &fileHeader, 1, readLength, filePointer ) != readLength )
{
return false;
}
template<typename T>
inline bool ReadHeader(FILE* fp, T& header)
{
- unsigned int readLength = sizeof(T);
+ const unsigned int readLength = sizeof(T);
// Load the information directly into our structure
- if (fread((void*)&header, 1, readLength, fp) != readLength)
+ if ( fread( &header, 1, readLength, fp ) != readLength )
{
return false;
}
const unsigned char ICO_IMAGE_INFO_HEADER = 40;
typedef unsigned char DATA8;
-#define A_VAL(p) (((DATA8 *)(p))[3])
+#define A_VAL(p) (reinterpret_cast< DATA8 * >( p )[3])
#define RGB_JOIN(r,g,b) \
(((r) << 16) + ((g) << 8) + (b))
#define ARGB_JOIN(a,r,g,b) \
(((a) << 24) + ((r) << 16) + ((g) << 8) + (b))
-#define IMG_TOO_BIG(w, h) \
- ((((unsigned long long)w) * ((unsigned long long)h)) >= \
- ((1ULL << (29 * (sizeof(void *) / 4))) - 2048))
bool read_ushort(unsigned char *map, size_t length, size_t *position, unsigned short *ret)
{
size_t position = chosen.bmoffset;//22 == position
- int w = chosen.w;
- int h = chosen.h;
- int cols = chosen.cols;
+ unsigned int w = chosen.w;
+ unsigned int h = chosen.h;
+ unsigned int cols = chosen.cols;
// read bmp header time... let's do some checking
if (!read_uint(&map[0], fsize, &position, &dword))
}
if (dword > 0)
{
- if ((int)dword != w)
+ if (dword != w)
{
w = dword;
diff_size = 1;
}
if (dword > 0)
{
- if ((int)dword != (h * 2))
+ if (dword != (h * 2))
{
h = dword / 2;
diff_size = 1;
return false; // colors important
}
- for(int i = 0; i < cols ; i ++)
+ for( unsigned int i = 0; i < cols ; i ++ )
{
unsigned char a, r, g, b;
}
// This is the reference way of calculating the total number of bytes necessary to store one row of pixels.
- int stride = ( ( ( bitcount * w ) + 31 ) / 32 ) * 4;
- int bitStride = ( ( w + 31 ) / 32 ) * 4;
+ unsigned int stride = ( ( ( bitcount * w ) + 31 ) / 32 ) * 4;
+ unsigned int bitStride = ( ( w + 31 ) / 32 ) * 4;
// Pixbuf only ever contains one scanline worth of data.
pixbuf.Resize( stride );
unsigned char* p = &map[position];
pix = &surface[0] + ( ( h - 1 ) * w );
- for( int i = 0; i < h; i++ )
+ for( unsigned int i = 0; i < h; i++ )
{
- for( int j = 0; j < w; j++ )
+ for( unsigned int j = 0; j < w; j++ )
{
*pix++ = ARGB_JOIN( p[3], p[0], p[1], p[2] );
p += 4;
case 24:
{
- for( int i = 0; i < h; i++ )
+ for( unsigned int i = 0; i < h; i++ )
{
pix = &surface[0] + ( ( h - 1 - i ) * w );
if( !read_mem( &map[0], fsize, &position, &pixbuf[0], stride ) )
return false;
}
unsigned char* p = &pixbuf[0];
- for( int j = 0; j < w; j++ )
+ for( unsigned int j = 0; j < w; j++ )
{
*pix++ = ARGB_JOIN( 0xff, p[0], p[1], p[2] );
p += 3;
case 8:
{
- for( int i = 0; i < h; i++ )
+ for( unsigned int i = 0; i < h; i++ )
{
pix = &surface[0] + ( ( h - 1 - i ) * w );
if( !read_mem( &map[0], fsize, &position, &pixbuf[0], stride ) )
return false;
}
unsigned char* p = &pixbuf[0];
- for( int j = 0; j < w; j++ )
+ for( unsigned int j = 0; j < w; j++ )
{
*pix++ = pal[*p++];
}
case 4:
{
- for( int i = 0; i < h; i++ )
+ for( unsigned int i = 0; i < h; i++ )
{
pix = &surface[0] + ( ( h - 1 - i ) * w );
if( !read_mem( &map[0], fsize, &position, &pixbuf[0], stride ) )
return false;
}
unsigned char* p = &pixbuf[0];
- for( int j = 0; j < w; j++ )
+ for( unsigned int j = 0; j < w; j++ )
{
if( j & 0x1 )
{
case 1:
{
- for( int i = 0; i < h; i++ )
+ for( unsigned int i = 0; i < h; i++ )
{
pix = &surface[0] + ( ( h - 1 - i ) * w );
if( !read_mem( &map[0], fsize, &position, &pixbuf[0], stride ) )
}
unsigned char* p = &pixbuf[0];
- for( int j = 0; j < w; j += 8 )
+ for( unsigned int j = 0; j < w; j += 8 )
{
*pix++ = pal[ *p >> 7 ];
*pix++ = pal[ *p >> 6 & 0x01 ];
// Apply mask.
// Precalc to save time in the loops.
- int bytesPerWidth = w / 8;
- int bytesRemainingPerWidth = w - ( bytesPerWidth << 3 );
+ unsigned int bytesPerWidth = w / 8;
+ unsigned int bytesRemainingPerWidth = w - ( bytesPerWidth << 3 );
// Loop for each line of the image.
- for( int i = 0; i < h; ++i )
+ for( unsigned int i = 0; i < h; ++i )
{
unsigned char *m = &maskbuf[0] + ( bitStride * i );
pix = &surface[0] + ( ( h - 1 - i ) * w );
// Do chunks of 8 pixels first so mask operations can be unrolled.
- for( int j = 0; j < bytesPerWidth; ++j )
+ for( unsigned int j = 0; j < bytesPerWidth; ++j )
{
// Unrolled 8 bits of the mask to avoid many conditions and branches.
A_VAL( pix++ ) = ( *m & ( 1 << 7 ) ) ? 0x00 : 0xff;
// Handle any remaining width ( < 8 ) or images that are < 8 wide.
if( bytesRemainingPerWidth > 0 )
{
- for( int j = 0; j < bytesRemainingPerWidth; ++j )
+ for( unsigned int j = 0; j < bytesRemainingPerWidth; ++j )
{
// Note: Although we are doing less that a bytes worth of mask, we still always start on the first bit.
// If the image is smaller than 8 pixels wide, each mask will still start on a new byte.
}
pixels = bitmap.GetPackedPixelsProfile()->ReserveBuffer( Pixel::RGBA8888, w, h );
- memcpy( pixels, (unsigned char*)&surface[0], w * h * 4 );
+ memcpy( pixels, &surface[0], w * h * 4 );
return true;
}
// so we can be sure of reading the whole thing from file in one call to fread.
/**
- * Template function to read from the file directly into our structure.
+ * Function to read from the file directly into our structure.
* @param[in] fp The file to read from
* @param[out] header The structure we want to store our information in
* @return true, if read successful, false otherwise
*/
-template<typename T>
-inline bool ReadHeader(FILE* fp, T& header)
+inline bool ReadHeader( FILE* filePointer, KtxFileHeader& header )
{
- unsigned int readLength = sizeof(T);
+ const unsigned int readLength = sizeof( KtxFileHeader );
// Load the information directly into our structure
- if (fread((void*)&header, 1, readLength, fp) != readLength)
+ if( fread( &header, 1, readLength, filePointer ) != readLength )
{
return false;
}
return true;
}
-bool LoadKtxHeader(FILE * const fp, unsigned int &width, unsigned int &height, KtxFileHeader &fileHeader)
+bool LoadKtxHeader( FILE * const fp, unsigned int& width, unsigned int& height, KtxFileHeader& fileHeader )
{
// Pull the bytes of the file header in as a block:
- if ( !ReadHeader(fp, fileHeader) )
+ if ( !ReadHeader( fp, fileHeader ) )
{
return false;
}
// Load the size of the image data:
uint32_t imageByteCount = 0;
- if (fread((void*)&imageByteCount, 1, 4, fp) != 4)
+ if ( fread( &imageByteCount, 1, 4, fp ) != 4 )
{
DALI_LOG_ERROR( "Read of image size failed.\n" );
return false;
}
// Load up the image bytes:
- PixelBuffer * const pixels = bitmap.GetCompressedProfile()->ReserveBufferOfSize( pixelFormat, width, height, (size_t) imageByteCount );
+ PixelBuffer* const pixels = bitmap.GetCompressedProfile()->ReserveBufferOfSize( pixelFormat, width, height, imageByteCount );
if(!pixels)
{
DALI_LOG_ERROR( "Unable to reserve a pixel buffer to load the requested bitmap into.\n" );
pixels = bitmap.GetPackedPixelsProfile()->ReserveBuffer(pixelFormat, width, height, bufferWidth, bufferHeight);
DALI_ASSERT_DEBUG(pixels);
- rows = (png_bytep*) malloc(sizeof(png_bytep) * height);
+ rows = reinterpret_cast< png_bytep* >( malloc(sizeof(png_bytep) * height) );
for(y=0; y<height; y++)
{
- rows[y] = (png_byte*) (pixels + y * stride);
+ rows[y] = pixels + y * stride;
}
// decode image
{
return -1;
}
- buf = ((unsigned char *) map)[(*position)++];
+ buf = reinterpret_cast< unsigned char * >( map )[(*position)++];
targetMultiByteInteger = (targetMultiByteInteger << 7) | (buf & 0x7f);
if ((buf & 0x80) == 0)
PixelBuffer* pixels = NULL;
size_t position = 0;
- unsigned int w, h;
+ unsigned int w, h;
unsigned int type;
unsigned int line_length;
unsigned char *line = NULL;
- int cur = 0, x, y;
+ unsigned int cur = 0, x, y;
if( fseek(fp,0,SEEK_END) )
{
memset(&surface[0], 0, w * h ); // w * h * 4
line_length = (w + 7) >> 3;
- for (y = 0; y < (int)h; y ++)
+ for (y = 0; y < h; y ++)
{
if (position + line_length > fsize)
{
}
line = &map[0] + position;
position += line_length;
- for (x = 0; x < (int)w; x++)
+ for (x = 0; x < w; x++)
{
int idx = x >> 3;
int offset = 1 << (0x07 - (x & 0x07));
}
pixels = bitmap.GetPackedPixelsProfile()->ReserveBuffer(Pixel::L8, w, h);//Pixel::RGBA8888
- memcpy(pixels, (unsigned char*)&surface[0], w * h );//w * h * 4
+ memcpy( pixels, &surface[0], w * h ); //w * h * 4
return true;
}
/*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
// EXTERNAL INCLUDES
#ifndef DALI_PROFILE_UBUNTU
+// Dlog uses C style casts internally
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wold-style-cast"
#include <dlog.h>
#else // DALI_PROFILE_UBUNTU
#include <cstdio>
LOG(LOG_DEFAULT, DALI_TAG, "%s", message.c_str());
break;
}
+#pragma GCC diagnostic pop
#else // DALI_PROFILE_UBUNTU
const char *format = NULL;
switch(level)
#include <config.h>
#endif
+// Glyphy is written using C style casts
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wold-style-cast"
+
#include "glyphy-common.hh"
#include "glyphy-geometry.hh"
#include "glyphy-arcs-bezier.hh"
glyphy_extents_extend (extents, &arc_extents);
}
}
+
+#pragma GCC diagnostic pop
#include <config.h>
#endif
+// Glyphy is written using C style casts
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wold-style-cast"
+
#include "glyphy-common.hh"
#include "glyphy-geometry.hh"
return true;
}
+
+#pragma GCC diagnostic pop
#ifndef GLYPHY_GEOMETRY_HH
#define GLYPHY_GEOMETRY_HH
+// Glyphy is written using C style casts
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wold-style-cast"
+
#include "glyphy-common.hh"
namespace GLyphy {
} /* namespace Geometry */
} /* namespace GLyphy */
+#pragma GCC diagnostic pop
+
#endif /* GLYPHY_GEOMETRY_HH */
#include <config.h>
#endif
+// Glyphy is written using C style casts
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wold-style-cast"
+
#include "glyphy-common.hh"
#include "glyphy-geometry.hh"
ret = ret | process_contour (endpoints + start, num_endpoints - start, endpoints, num_endpoints, bool (inverse));
return ret;
}
+
+#pragma GCC diagnostic pop
/*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
error = FT_Glyph_To_Bitmap( &glyph, FT_RENDER_MODE_NORMAL, 0, 1 );
if ( FT_Err_Ok == error )
{
- FT_BitmapGlyph bitmapGlyph = (FT_BitmapGlyph)glyph;
+ FT_BitmapGlyph bitmapGlyph = reinterpret_cast< FT_BitmapGlyph >( glyph );
ConvertBitmap( data, bitmapGlyph->bitmap );
}
else
#include <float.h>
#include <assert.h>
#include <string.h>
+
+// resampler is written using C style casts
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wold-style-cast"
+
#include "resampler.h"
#define resampler_assert assert
return g_filters[filter_num].name;
}
+#pragma GCC diagnostic pop