From 07706f56cd421bf8b101a5c0fe44674d36e161a0 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Sat, 6 Apr 2013 13:14:46 +0200 Subject: tagging ychat-0.5.1 --- hmap.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'hmap.cpp') diff --git a/hmap.cpp b/hmap.cpp index ec9c37c..662a203 100644 --- a/hmap.cpp +++ b/hmap.cpp @@ -1,6 +1,7 @@ #ifndef hmap_cpp #define hmap_cpp + #include "hmap.h" using namespace std; @@ -159,6 +160,14 @@ int hmap::nextPrime( int n ) const return n; } +template void +hmap::run_func( void (*func)(obj_type) ) +{ + for( int i = 0; i < array.size( ); i++ ) + if ( array[i].info == ACTIVE ) + ( *func ) ( array[i].element ); +} + template void hmap::run_func( void (*func)(obj_type, void*), void* v_arg ) { -- cgit v1.2.3