[gimp] app: convert gimp:mask-components to C++
- From: Ell <ell src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: convert gimp:mask-components to C++
- Date: Sat, 16 Feb 2019 15:04:55 +0000 (UTC)
commit a7f7a485bd68e45cab07fe3c730743f716b596cf
Author: Ell <ell_se yahoo com>
Date: Sat Feb 16 04:30:39 2019 -0500
app: convert gimp:mask-components to C++
... in preperation for next commit.
app/operations/Makefile.am | 2 +-
...maskcomponents.c => gimpoperationmaskcomponents.cc} | 18 ++++++++++++------
2 files changed, 13 insertions(+), 7 deletions(-)
---
diff --git a/app/operations/Makefile.am b/app/operations/Makefile.am
index de9a042a76..4e49a52dab 100644
--- a/app/operations/Makefile.am
+++ b/app/operations/Makefile.am
@@ -60,7 +60,7 @@ libappoperations_a_sources = \
gimpoperationgrow.h \
gimpoperationhistogramsink.c \
gimpoperationhistogramsink.h \
- gimpoperationmaskcomponents.c \
+ gimpoperationmaskcomponents.cc \
gimpoperationmaskcomponents.h \
gimpoperationprofiletransform.c \
gimpoperationprofiletransform.h \
diff --git a/app/operations/gimpoperationmaskcomponents.c b/app/operations/gimpoperationmaskcomponents.cc
similarity index 94%
rename from app/operations/gimpoperationmaskcomponents.c
rename to app/operations/gimpoperationmaskcomponents.cc
index 1c9425c410..53f564d9bd 100644
--- a/app/operations/gimpoperationmaskcomponents.c
+++ b/app/operations/gimpoperationmaskcomponents.cc
@@ -22,10 +22,15 @@
#include <gegl.h>
+extern "C"
+{
+
#include "operations-types.h"
#include "gimpoperationmaskcomponents.h"
+} /* extern "C" */
+
enum
{
@@ -91,8 +96,9 @@ gimp_operation_mask_components_class_init (GimpOperationMaskComponentsClass *kla
"The component mask",
GIMP_TYPE_COMPONENT_MASK,
GIMP_COMPONENT_MASK_ALL,
- G_PARAM_READWRITE |
- G_PARAM_CONSTRUCT));
+ (GParamFlags) (
+ G_PARAM_READWRITE |
+ G_PARAM_CONSTRUCT)));
}
static void
@@ -131,7 +137,7 @@ gimp_operation_mask_components_set_property (GObject *object,
switch (property_id)
{
case PROP_MASK:
- self->mask = g_value_get_flags (value);
+ self->mask = (GimpComponentMask) g_value_get_flags (value);
break;
default:
@@ -205,9 +211,9 @@ gimp_operation_mask_components_process (GeglOperation *operation,
gint level)
{
GimpOperationMaskComponents *self = GIMP_OPERATION_MASK_COMPONENTS (operation);
- gfloat *src = in_buf;
- gfloat *aux = aux_buf;
- gfloat *dest = out_buf;
+ const gfloat *src = (const gfloat *) in_buf;
+ const gfloat *aux = (const gfloat *) aux_buf;
+ gfloat *dest = (gfloat *) out_buf;
GimpComponentMask mask = self->mask;
static const gfloat nothing[] = { 0.0, 0.0, 0.0, 1.0 };
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]