summaryrefslogtreecommitdiffhomepage
path: root/examples
diff options
context:
space:
mode:
authorTyge Lovset <[email protected]>2022-05-13 01:21:39 +0200
committerTyge Lovset <[email protected]>2022-05-13 01:21:39 +0200
commit0232d9f3f6206305662cb9163fdb23372ab6b227 (patch)
tree29ad27762c09f3af3edd0b716e8eabcbb68965cb /examples
parent7b6fb49407abdd41c2bc1fdb8c84aaabcc3295de (diff)
downloadSTC-modified-0232d9f3f6206305662cb9163fdb23372ab6b227.tar.gz
STC-modified-0232d9f3f6206305662cb9163fdb23372ab6b227.zip
constness and code formatting.
Diffstat (limited to 'examples')
-rw-r--r--examples/ex_gauss1.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/examples/ex_gauss1.c b/examples/ex_gauss1.c
index bdcd1bd3..081a4a73 100644
--- a/examples/ex_gauss1.c
+++ b/examples/ex_gauss1.c
@@ -11,13 +11,10 @@
#include <stc/cmap.h>
// Declare int vector with map entries that can be sorted by map keys.
-struct {int first; size_t second;} typedef mapval;
-static int compare(mapval *a, mapval *b) {
- return c_default_cmp(&a->first, &b->first);
-}
+struct { int first; size_t second; } typedef mapval;
#define i_val mapval
-#define i_cmp compare
+#define i_less(x, y) x->first < y->first
#define i_tag pair
#include <stc/cvec.h>