From b1e1b4250451d45673c5f5ca895c59103586d3fa Mon Sep 17 00:00:00 2001 From: noloader Date: Fri, 3 Jul 2015 21:08:32 +0000 Subject: Cut-over to COUNTOF in source files git-svn-id: svn://svn.code.sf.net/p/cryptopp/code/trunk/c5@570 57ff6487-cd31-0410-9ec3-f628ee90f5f0 --- hrtimer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'hrtimer.cpp') diff --git a/hrtimer.cpp b/hrtimer.cpp index 906ec4a..cd268bf 100644 --- a/hrtimer.cpp +++ b/hrtimer.cpp @@ -24,7 +24,7 @@ double TimerBase::ConvertTo(TimerWord t, Unit unit) { static unsigned long unitsPerSecondTable[] = {1, 1000, 1000*1000, 1000*1000*1000}; - assert(unit < sizeof(unitsPerSecondTable) / sizeof(unitsPerSecondTable[0])); + assert(unit < COUNTOF(unitsPerSecondTable)); return (double)CRYPTOPP_VC6_INT64 t * unitsPerSecondTable[unit] / CRYPTOPP_VC6_INT64 TicksPerSecond(); } -- cgit v1.2.1