aboutsummaryrefslogtreecommitdiffstats
path: root/common/hashlib.h
diff options
context:
space:
mode:
authorgatecat <gatecat@ds0.me>2022-02-03 15:28:46 +0000
committergatecat <gatecat@ds0.me>2022-02-03 15:28:46 +0000
commit84399caebe3c3eb0eba5275b7e2d5479404ba1a7 (patch)
tree42d9ba33932d4da9155fdb5b44e4a4ed6e6ef104 /common/hashlib.h
parenta78719ecc157475213356c210aff26502c372c34 (diff)
downloadnextpnr-84399caebe3c3eb0eba5275b7e2d5479404ba1a7.tar.gz
nextpnr-84399caebe3c3eb0eba5275b7e2d5479404ba1a7.tar.bz2
nextpnr-84399caebe3c3eb0eba5275b7e2d5479404ba1a7.zip
run clangformat
Signed-off-by: gatecat <gatecat@ds0.me>
Diffstat (limited to 'common/hashlib.h')
-rw-r--r--common/hashlib.h4
1 files changed, 1 insertions, 3 deletions
diff --git a/common/hashlib.h b/common/hashlib.h
index 70de8c91..2f7357e2 100644
--- a/common/hashlib.h
+++ b/common/hashlib.h
@@ -28,9 +28,7 @@ const int hashtable_size_factor = 3;
// Cantor pairing function for two non-negative integers
// https://en.wikipedia.org/wiki/Pairing_function
-inline unsigned int mkhash(unsigned int a, unsigned int b) {
- return (a*a + 3*a + 2*a*b + b + b*b) / 2;
-}
+inline unsigned int mkhash(unsigned int a, unsigned int b) { return (a * a + 3 * a + 2 * a * b + b + b * b) / 2; }
// traditionally 5381 is used as starting value for the djb2 hash
const unsigned int mkhash_init = 5381;