Cycles: Fix strict -Wpedantic warnings with GCC
Patch by Stefan Werner, thanks!
This commit is contained in:
@@ -30,7 +30,7 @@ class Shader;
|
|||||||
|
|
||||||
class Background : public Node {
|
class Background : public Node {
|
||||||
public:
|
public:
|
||||||
NODE_DECLARE;
|
NODE_DECLARE
|
||||||
|
|
||||||
float ao_factor;
|
float ao_factor;
|
||||||
float ao_distance;
|
float ao_distance;
|
||||||
|
@@ -39,7 +39,7 @@ class Scene;
|
|||||||
|
|
||||||
class Camera : public Node {
|
class Camera : public Node {
|
||||||
public:
|
public:
|
||||||
NODE_DECLARE;
|
NODE_DECLARE
|
||||||
|
|
||||||
/* Specifies an offset for the shutter's time interval. */
|
/* Specifies an offset for the shutter's time interval. */
|
||||||
enum MotionPosition {
|
enum MotionPosition {
|
||||||
|
@@ -53,7 +53,7 @@ public:
|
|||||||
|
|
||||||
class Film : public Node {
|
class Film : public Node {
|
||||||
public:
|
public:
|
||||||
NODE_DECLARE;
|
NODE_DECLARE
|
||||||
|
|
||||||
float exposure;
|
float exposure;
|
||||||
array<Pass> passes;
|
array<Pass> passes;
|
||||||
|
@@ -201,14 +201,14 @@ public:
|
|||||||
/* Node definition utility macros */
|
/* Node definition utility macros */
|
||||||
|
|
||||||
#define SHADER_NODE_CLASS(type) \
|
#define SHADER_NODE_CLASS(type) \
|
||||||
NODE_DECLARE; \
|
NODE_DECLARE \
|
||||||
type(); \
|
type(); \
|
||||||
virtual ShaderNode *clone() const { return new type(*this); } \
|
virtual ShaderNode *clone() const { return new type(*this); } \
|
||||||
virtual void compile(SVMCompiler& compiler); \
|
virtual void compile(SVMCompiler& compiler); \
|
||||||
virtual void compile(OSLCompiler& compiler); \
|
virtual void compile(OSLCompiler& compiler); \
|
||||||
|
|
||||||
#define SHADER_NODE_NO_CLONE_CLASS(type) \
|
#define SHADER_NODE_NO_CLONE_CLASS(type) \
|
||||||
NODE_DECLARE; \
|
NODE_DECLARE \
|
||||||
type(); \
|
type(); \
|
||||||
virtual void compile(SVMCompiler& compiler); \
|
virtual void compile(SVMCompiler& compiler); \
|
||||||
virtual void compile(OSLCompiler& compiler); \
|
virtual void compile(OSLCompiler& compiler); \
|
||||||
|
@@ -29,7 +29,7 @@ class Scene;
|
|||||||
|
|
||||||
class Integrator : public Node {
|
class Integrator : public Node {
|
||||||
public:
|
public:
|
||||||
NODE_DECLARE;
|
NODE_DECLARE
|
||||||
|
|
||||||
int min_bounce;
|
int min_bounce;
|
||||||
int max_bounce;
|
int max_bounce;
|
||||||
|
@@ -48,7 +48,7 @@ struct PackedPatchTable;
|
|||||||
|
|
||||||
class Mesh : public Node {
|
class Mesh : public Node {
|
||||||
public:
|
public:
|
||||||
NODE_DECLARE;
|
NODE_DECLARE
|
||||||
|
|
||||||
/* Mesh Triangle */
|
/* Mesh Triangle */
|
||||||
struct Triangle {
|
struct Triangle {
|
||||||
|
@@ -40,7 +40,7 @@ struct Transform;
|
|||||||
|
|
||||||
class Object : public Node {
|
class Object : public Node {
|
||||||
public:
|
public:
|
||||||
NODE_DECLARE;
|
NODE_DECLARE
|
||||||
|
|
||||||
Mesh *mesh;
|
Mesh *mesh;
|
||||||
Transform tfm;
|
Transform tfm;
|
||||||
|
@@ -82,7 +82,7 @@ enum DisplacementMethod {
|
|||||||
|
|
||||||
class Shader : public Node {
|
class Shader : public Node {
|
||||||
public:
|
public:
|
||||||
NODE_DECLARE;
|
NODE_DECLARE
|
||||||
|
|
||||||
int pass_id;
|
int pass_id;
|
||||||
|
|
||||||
|
@@ -514,12 +514,12 @@ ccl_device_inline float len3(const ssef& a)
|
|||||||
/* faster version for SSSE3 */
|
/* faster version for SSSE3 */
|
||||||
typedef ssei shuffle_swap_t;
|
typedef ssei shuffle_swap_t;
|
||||||
|
|
||||||
ccl_device_inline const shuffle_swap_t shuffle_swap_identity(void)
|
ccl_device_inline shuffle_swap_t shuffle_swap_identity(void)
|
||||||
{
|
{
|
||||||
return _mm_set_epi8(15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0);
|
return _mm_set_epi8(15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
ccl_device_inline const shuffle_swap_t shuffle_swap_swap(void)
|
ccl_device_inline shuffle_swap_t shuffle_swap_swap(void)
|
||||||
{
|
{
|
||||||
return _mm_set_epi8(7, 6, 5, 4, 3, 2, 1, 0, 15, 14, 13, 12, 11, 10, 9, 8);
|
return _mm_set_epi8(7, 6, 5, 4, 3, 2, 1, 0, 15, 14, 13, 12, 11, 10, 9, 8);
|
||||||
}
|
}
|
||||||
@@ -534,12 +534,12 @@ ccl_device_inline const ssef shuffle_swap(const ssef& a, const shuffle_swap_t& s
|
|||||||
/* somewhat slower version for SSE2 */
|
/* somewhat slower version for SSE2 */
|
||||||
typedef int shuffle_swap_t;
|
typedef int shuffle_swap_t;
|
||||||
|
|
||||||
ccl_device_inline const shuffle_swap_t shuffle_swap_identity(void)
|
ccl_device_inline shuffle_swap_t shuffle_swap_identity(void)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
ccl_device_inline const shuffle_swap_t shuffle_swap_swap(void)
|
ccl_device_inline shuffle_swap_t shuffle_swap_swap(void)
|
||||||
{
|
{
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user