From 68feac96b67b80a4fe59c4f349b58af9c77e2709 Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Mon, 13 Aug 2012 05:26:25 +0200 Subject: [PATCH] Add const versions of base_uint.end()/begin(), make size() const. --- src/uint256.h | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/uint256.h b/src/uint256.h index abd0b71e6..eb0066fa2 100644 --- a/src/uint256.h +++ b/src/uint256.h @@ -344,7 +344,17 @@ public: return (unsigned char*)&pn[WIDTH]; } - unsigned int size() + const unsigned char* begin() const + { + return (unsigned char*)&pn[0]; + } + + const unsigned char* end() const + { + return (unsigned char*)&pn[WIDTH]; + } + + unsigned int size() const { return sizeof(pn); }