diff options
author | Neil Roberts <neil@linux.intel.com> | 2012-10-19 16:55:27 +0100 |
---|---|---|
committer | Neil Roberts <neil@linux.intel.com> | 2012-10-19 16:55:27 +0100 |
commit | aee7c4d0b9546312c8f44a54f93f6f3f4b9a46f9 (patch) | |
tree | 6afa8b849a347a63435ef28bce49fc9584dea766 | |
parent | db50c3015c589375029a4c26c58db8295bb17bca (diff) | |
download | cogl-aee7c4d0b9546312c8f44a54f93f6f3f4b9a46f9.tar.gz |
Remove the cogl_foo_init_from_foo copy constructors
The CoglQuaternion type is allocated by the caller and can not have
any additional resources so it should be obvious that you can just use
the regular assignment operator to copy them. None of the other types
except the commented out vec4 type have a copy constructor so we
might as well remove these too.
Reviewed-by: Robert Bragg <robert@linux.intel.com>
-rw-r--r-- | cogl/cogl-quaternion.c | 7 | ||||
-rw-r--r-- | cogl/cogl-quaternion.h | 11 | ||||
-rw-r--r-- | cogl/cogl-vector.c | 6 | ||||
-rw-r--r-- | doc/reference/cogl2/cogl2-sections.txt | 1 |
4 files changed, 0 insertions, 25 deletions
diff --git a/cogl/cogl-quaternion.c b/cogl/cogl-quaternion.c index 70cfe3eb..eac9d94a 100644 --- a/cogl/cogl-quaternion.c +++ b/cogl/cogl-quaternion.c @@ -226,13 +226,6 @@ cogl_quaternion_init_from_euler (CoglQuaternion *quaternion, sin_heading * sin_pitch * cos_roll; } -void -cogl_quaternion_init_from_quaternion (CoglQuaternion *quaternion, - CoglQuaternion *src) -{ - memcpy (quaternion, src, sizeof (float) * 4); -} - /* XXX: it could be nice to make something like this public... */ /* * COGL_MATRIX_READ: diff --git a/cogl/cogl-quaternion.h b/cogl/cogl-quaternion.h index a1b3cfb9..8daf95d4 100644 --- a/cogl/cogl-quaternion.h +++ b/cogl/cogl-quaternion.h @@ -260,17 +260,6 @@ cogl_quaternion_init_from_euler (CoglQuaternion *quaternion, const CoglEuler *euler); /** - * cogl_quaternion_init_from_quaternion: - * @quaternion: A #CoglQuaternion - * @src: A #CoglQuaternion with which to initialize @quaternion - * - * Since: 2.0 - */ -void -cogl_quaternion_init_from_quaternion (CoglQuaternion *quaternion, - CoglQuaternion *src); - -/** * cogl_quaternion_init_from_matrix: * @quaternion: A Cogl Quaternion * @matrix: A rotation matrix with which to initialize the quaternion diff --git a/cogl/cogl-vector.c b/cogl/cogl-vector.c index 7984db4f..80152665 100644 --- a/cogl/cogl-vector.c +++ b/cogl/cogl-vector.c @@ -221,12 +221,6 @@ cogl_vector4_init_zero (float *vector) memset (vector, 0, sizeof (CoglVector4)); } -void -cogl_vector4_init_from_vector4 (float *vector, float *src) -{ - *vector4 = *src; -} - CoglBool cogl_vector4_equal (const void *v0, const void *v1) { diff --git a/doc/reference/cogl2/cogl2-sections.txt b/doc/reference/cogl2/cogl2-sections.txt index c02b87bd..ba43264a 100644 --- a/doc/reference/cogl2/cogl2-sections.txt +++ b/doc/reference/cogl2/cogl2-sections.txt @@ -550,7 +550,6 @@ cogl_euler_free CoglQuaternion cogl_quaternion_init_identity cogl_quaternion_init -cogl_quaternion_init_from_quaternion cogl_quaternion_init_from_angle_vector cogl_quaternion_init_from_array cogl_quaternion_init_from_x_rotation |