From 4a6fc376e80ad2e08fcd00708fd99b3eb3db8642 Mon Sep 17 00:00:00 2001 From: Damien Bihel Date: Tue, 20 Dec 2022 14:35:10 +0100 Subject: [PATCH] formating --- demos/helloworld/.gitignore | 8 -------- lib/stubs/variant.cpp | 12 ++++++------ ppx/Makefile | 2 -- 3 files changed, 6 insertions(+), 16 deletions(-) delete mode 100644 demos/helloworld/.gitignore diff --git a/demos/helloworld/.gitignore b/demos/helloworld/.gitignore deleted file mode 100644 index 8e5b701..0000000 --- a/demos/helloworld/.gitignore +++ /dev/null @@ -1,8 +0,0 @@ -*.cm[oxi] -*.o -camlcode.o.startup.s - -/controller.h -/controller_c.cpp -/helloworld - diff --git a/lib/stubs/variant.cpp b/lib/stubs/variant.cpp index ab854c3..9aaeef8 100644 --- a/lib/stubs/variant.cpp +++ b/lib/stubs/variant.cpp @@ -34,30 +34,30 @@ extern "C" { CAMLlocal1(_var); if (!var.isValid()) { - _dest =caml_hash_variant("empty"); + _dest = caml_hash_variant("empty"); } else { const int ut = var.userType(); switch (ut) { case QMetaType::Bool: _dest = caml_alloc(2, 0); - Store_field(_dest, 0,caml_hash_variant("bool")); + Store_field(_dest, 0, caml_hash_variant("bool")); Store_field(_dest, 1, Val_bool(var.toBool())); break; case QMetaType::QString: _dest = caml_alloc(2, 0); - Store_field(_dest, 0,caml_hash_variant("string")); + Store_field(_dest, 0, caml_hash_variant("string")); Store_field(_dest, 1, caml_copy_string(var.value().toLocal8Bit().data())); break; case QMetaType::Int: _dest = caml_alloc(2, 0); - Store_field(_dest, 0,caml_hash_variant("int")); + Store_field(_dest, 0, caml_hash_variant("int")); Store_field(_dest, 1, Val_int(var.value())); break; case QMetaType::Float: case QMetaType::Double: _dest = caml_alloc(2, 0); - Store_field(_dest, 0,caml_hash_variant("float")); + Store_field(_dest, 0, caml_hash_variant("float")); Store_field(_dest, 1, caml_copy_double(var.toFloat())); break; case QMetaType::User: @@ -67,7 +67,7 @@ extern "C" { _var = caml_alloc_small(1,Abstract_tag); (*((QObject **) &Field(_var, 0))) = vvv; _dest = caml_alloc(2,0); - Store_field(_dest, 0,caml_hash_variant("qobject")); + Store_field(_dest, 0, caml_hash_variant("qobject")); Store_field(_dest, 1, _var); } break; diff --git a/ppx/Makefile b/ppx/Makefile index 374b570..0078fc1 100644 --- a/ppx/Makefile +++ b/ppx/Makefile @@ -21,5 +21,3 @@ watch: ppx_qt: ppx_qt.native ln -sf ./ppx_qt.native ./ppx_qt - -