From 687ad1991233e1d7e0dbfe31b5d16d5146848736 Mon Sep 17 00:00:00 2001 From: Myun2 Date: Thu, 3 Jun 2010 15:47:54 +0900 Subject: [PATCH] =?utf8?q?begin=5Fend=5Fiterator.hpp:=20countup=5Fiterator?= =?utf8?q?=E3=81=AEtypedef=E8=BF=BD=E5=8A=A0=20roast=5Fcommon.h:=20lengtho?= =?utf8?q?f()=E3=83=9E=E3=82=AF=E3=83=AD=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- roast/include/roast/container/begin_end_iterator.hpp | 1 + roast/include/roast_common.h | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/roast/include/roast/container/begin_end_iterator.hpp b/roast/include/roast/container/begin_end_iterator.hpp index 1574521d..6fd7971b 100644 --- a/roast/include/roast/container/begin_end_iterator.hpp +++ b/roast/include/roast/container/begin_end_iterator.hpp @@ -79,6 +79,7 @@ namespace roast counter_iterator(int start,int end) : _Base(start,end) {} }; + typedef counter_iterator countup_iterator; } #endif//__SFJP_ROAST__container__begin_end_iterator_HPP__ diff --git a/roast/include/roast_common.h b/roast/include/roast_common.h index 81fe69aa..6b240bd8 100644 --- a/roast/include/roast_common.h +++ b/roast/include/roast_common.h @@ -47,6 +47,12 @@ typedef unsigned long roast_ulong; (X & 0xFF000000) >> 24 ) + +#define ROAST_LENGTHOF(x) (sizeof(x) / sizeof(*(x))) +#ifndef lengthof + #define lengthof(x) ROAST_LENGTHOF(x) +#endif + /* // _ROAST_REMOVE_MACRO_NS #if defined _ROAST_NOT_REMOVE_MACRO_NS -- 2.11.0