From 6c8f6cf5a8d0dda53fd6f59c4506efdaf6b72c21 Mon Sep 17 00:00:00 2001 From: Ko van der Sloot Date: Sat, 21 Oct 2023 13:12:45 +0200 Subject: [PATCH] code quaility --- src/Targets.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Targets.cxx b/src/Targets.cxx index e273af1..5486e01 100644 --- a/src/Targets.cxx +++ b/src/Targets.cxx @@ -435,7 +435,7 @@ namespace Timbl { void ClassDistribution::Merge( const ClassDistribution& VD ){ for ( const auto& it : VD.distribution ){ size_t key = it.first; - Vfield *vd = it.second; + const Vfield *vd = it.second; if ( distribution.find(key) != distribution.end() ){ // the key is already present, increment the frequency distribution[key]->AddFreq( vd->Freq() ); @@ -454,8 +454,8 @@ namespace Timbl { void WClassDistribution::MergeW( const ClassDistribution& VD, double Weight ){ for ( const auto& it : VD.distribution ){ - Vfield *vd = it.second; size_t key = it.first; + const Vfield *vd = it.second; if ( distribution.find(key) != distribution.end() ){ distribution[key]->SetWeight( distribution[key]->Weight() + vd->Weight() *Weight ); }