[libmanette] mapping: Use multiline comments



commit 05302e0d9dff20e96c958681faa209b856cdd6e1
Author: Adrien Plazas <kekun plazas laposte net>
Date:   Sun Nov 22 09:14:45 2020 +0100

    mapping: Use multiline comments
    
    That's what we do almost everywhere else and in other libs I maintain,
    let's standardize on that.

 src/manette-mapping.c | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)
---
diff --git a/src/manette-mapping.c b/src/manette-mapping.c
index 80e8e91..55eaf18 100644
--- a/src/manette-mapping.c
+++ b/src/manette-mapping.c
@@ -227,7 +227,7 @@ parse_mapping_hat (gchar                *start,
   if (!try_str_to_guint16 (start, end, &hat_position_2pow))
     return FALSE;
 
-  // hat_position: 0 up, 1 right, 2 down, 3 left.
+  /* hat_position: 0 up, 1 right, 2 down, 3 left. */
   while (hat_position_2pow > 1) {
     hat_position_2pow >>= 1;
     hat_position++;
@@ -236,9 +236,9 @@ parse_mapping_hat (gchar                *start,
   if (hat_position > 3)
     return FALSE;
 
-  // hat0x, hat0y, hat1x, hat1y…
+  /* hat0x, hat0y, hat1x, hat1y… */
   *index = hat_index * 2 + (hat_position + 1) % 2;
-  // left or up: negative, right or down: positive.
+  /* left or up: negative, right or down: positive. */
   *range = ((hat_position + 1) % 4) < 2 ? MANETTE_MAPPING_RANGE_NEGATIVE :
                                           MANETTE_MAPPING_RANGE_POSITIVE;
   *invert = *range == MANETTE_MAPPING_RANGE_NEGATIVE;
@@ -419,8 +419,9 @@ is_valid_guid (const gchar *string)
   return TRUE;
 }
 
-// This function doesn't take care of cleaning up the object's state before
-// setting it.
+/* This function doesn't take care of cleaning up the object's state before
+ * setting it.
+ */
 static void
 set_from_mapping_string (ManetteMapping *self,
                          const gchar    *mapping_string)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]