]> granicus.if.org Git - pdns/commitdiff
big speedup
authorBert Hubert <bert.hubert@netherlabs.nl>
Fri, 16 Jun 2006 10:01:14 +0000 (10:01 +0000)
committerBert Hubert <bert.hubert@netherlabs.nl>
Fri, 16 Jun 2006 10:01:14 +0000 (10:01 +0000)
git-svn-id: svn://svn.powerdns.com/pdns/trunk/pdns@852 d19b8d6e-7fed-0310-83ef-9ca221ded41b

pdns/syncres.hh

index a1339acc63aa5fc753cfb950802c312e07219c72..bdda17738692565bf7d9c814f4f9e57c0852b6dd 100644 (file)
@@ -120,7 +120,7 @@ public:
     }
   }
 
-  void submit(int val, struct timeval*tv = 0)
+  void submit(int val, struct timeval* tv)
   {
     struct timeval now=getOrMakeTime(tv);
 
@@ -136,7 +136,7 @@ public:
     d_val=(float)((1-factor)*val+ (float)factor*d_val); 
   }
 
-  double get(struct timeval*tv = 0)
+  double get(struct timeval* tv)
   {
     struct timeval now=getOrMakeTime(tv);
     float diff=makeFloat(d_lastget-now);
@@ -292,7 +292,7 @@ public:
       double ret=numeric_limits<double>::max();
       double tmp;
       for(collection_t::iterator pos=d_collection.begin(); pos != d_collection.end(); ++pos) {
-       if((tmp=pos->second.get()) < ret) {
+       if((tmp=pos->second.get(now)) < ret) {
          ret=tmp;
          d_best=pos->first;
        }