From c47430b1ae753973a205855aad787169c565f21906430b21410e3786786953d5 Mon Sep 17 00:00:00 2001 From: ADAM David Alan Martin Date: Fri, 1 Aug 2025 00:49:17 -0400 Subject: [PATCH] Some simple C++ modernizations before I make bitvec RAII. --- src/bitvec.hh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/bitvec.hh b/src/bitvec.hh index 8a75331..2d61a84 100644 --- a/src/bitvec.hh +++ b/src/bitvec.hh @@ -3,13 +3,13 @@ #include "d_size.h" -#define BVEC_TYPE uchar_t -#define BVEC_SIZE sizeof(BVEC_TYPE) +using BVEC_TYPE= uchar_t; +constexpr auto BVEC_SIZE= sizeof(BVEC_TYPE); -typedef struct { +struct bitvec_t { BVEC_TYPE *vec; int len; /* number of bits [1 based] */ -} bitvec_t; +}; extern "C" {