summaryrefslogtreecommitdiff
path: root/gi/enumeration.cpp
diff options
context:
space:
mode:
authorPhilip Chimento <philip.chimento@gmail.com>2016-09-05 15:09:07 -0700
committerPhilip Chimento <philip.chimento@gmail.com>2016-09-27 19:32:01 -0700
commitea52a3dca0e9b5fb2e53625ec3d3ed897b542f8b (patch)
treead053fe41cd40c0a605eeadc61b62919cf6d637f /gi/enumeration.cpp
parente26191a137fc671b5e8fc8c18d5d6103edaa8b35 (diff)
downloadgjs-ea52a3dca0e9b5fb2e53625ec3d3ed897b542f8b.tar.gz
js: Prefer bool to gboolean
Since we removed JSBool, JS_TRUE, and JS_FALSE in the previous commit, we now also make usage of gboolean, TRUE, and FALSE consistent. In some places, JSBool and gboolean were used interchangeably. Here, we take the approach of using C++ bool, true, and false everywhere, except when required by the API, e.g. for the return type of idle functions. In a few instances, TRUE and FALSE were used in comments in JS code; here we change those to true and false to avoid confusion. Fixes a few formatting glitches in lines of code that were touched anyway. https://bugzilla.gnome.org/show_bug.cgi?id=742249
Diffstat (limited to 'gi/enumeration.cpp')
-rw-r--r--gi/enumeration.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/gi/enumeration.cpp b/gi/enumeration.cpp
index 682f7afc..7d058fc8 100644
--- a/gi/enumeration.cpp
+++ b/gi/enumeration.cpp
@@ -121,7 +121,7 @@ gjs_define_enum_values(JSContext *context,
n_values = g_enum_info_get_n_values(info);
for (i = 0; i < n_values; ++i) {
GIValueInfo *value_info = g_enum_info_get_value(info, i);
- gboolean failed;
+ bool failed;
failed = !gjs_define_enum_value(context, in_object, value_info);