On 25/10/18 7:42 am, Ian Romanick wrote:
On 10/23/2018 04:15 AM, Eric Engestrom wrote:
Suggested-by: Timothy Arceri <[email protected]>
Um no :P I suggested you fix the formatting in your patch to match the
Mesa style.
Signed-off-by: Eric Engestrom <[email protected]>
---
Timothy, I opted to remove them all instead of adding even more, as it
would break again next time something changes (the set_foreach() one was
already broken before my patch for instance) and result in lots of
unnecessary churn for seemingly no gain, and I don't like hiding the
backslash away (it hinders readability).
NAK... we use this formatting everywhere in Mesa. The point is to move
the \ characters out of the way. When you're trying to read a
multi-line macro, they are distracting, so it is nice to move them over.
---
src/util/hash_table.h | 6 +++---
src/util/set.h | 6 +++---
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/src/util/hash_table.h b/src/util/hash_table.h
index b96cd6146960a6a6f8a1..b9c9dfa01aeaa5e9cac1 100644
--- a/src/util/hash_table.h
+++ b/src/util/hash_table.h
@@ -139,9 +139,9 @@ _mesa_fnv32_1a_accumulate_block(uint32_t hash, const void
*data, size_t size)
* an entry's data with the deleted marker), but not against insertion
* (which may rehash the table, making entry a dangling pointer).
*/
-#define hash_table_foreach(ht, entry) \
- for (struct hash_entry *entry = _mesa_hash_table_next_entry(ht, NULL); \
- entry != NULL; \
+#define hash_table_foreach(ht, entry) \
+ for (struct hash_entry *entry = _mesa_hash_table_next_entry(ht, NULL); \
+ entry != NULL; \
entry = _mesa_hash_table_next_entry(ht, entry))
static inline void
diff --git a/src/util/set.h b/src/util/set.h
index 3c9abfe77128292557ec..4307f4732fd4fde132a0 100644
--- a/src/util/set.h
+++ b/src/util/set.h
@@ -96,9 +96,9 @@ _mesa_set_random_entry(struct set *set,
* insertion (which may rehash the set, making entry a dangling
* pointer).
*/
-#define set_foreach(set, entry) \
- for (struct set_entry *entry = _mesa_set_next_entry(set, NULL); \
- entry != NULL; \
+#define set_foreach(set, entry) \
+ for (struct set_entry *entry = _mesa_set_next_entry(set, NULL); \
+ entry != NULL; \
entry = _mesa_set_next_entry(set, entry))
#ifdef __cplusplus
_______________________________________________
mesa-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-dev