mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-12 02:26:26 +05:00
Removed full variable from compressEquals siganture's function
This commit is contained in:
committed by
Dan Christian Bogos
parent
08a8fedd5f
commit
def6b2091e
@@ -232,7 +232,7 @@ func (rIv *RateSInterval) CompressEquals(rIv2 *RateSInterval) (eq bool) {
|
||||
return
|
||||
}
|
||||
for i, rIcr := range rIv.Increments {
|
||||
if !rIcr.CompressEquals(rIv2.Increments[i], true) {
|
||||
if !rIcr.CompressEquals(rIv2.Increments[i]) {
|
||||
return
|
||||
}
|
||||
}
|
||||
@@ -250,11 +250,11 @@ func (rIv *RateSInterval) Cost() *decimal.Big {
|
||||
}
|
||||
|
||||
// CompressEquals compares two RateSIncrement for Compress function
|
||||
func (rIcr *RateSIncrement) CompressEquals(rIcr2 *RateSIncrement, full bool) (eq bool) {
|
||||
func (rIcr *RateSIncrement) CompressEquals(rIcr2 *RateSIncrement) (eq bool) {
|
||||
if rIcr.Rate.UID() != rIcr2.Rate.UID() {
|
||||
return
|
||||
}
|
||||
if full && rIcr.IntervalRateIndex != rIcr2.IntervalRateIndex {
|
||||
if rIcr.IntervalRateIndex != rIcr2.IntervalRateIndex {
|
||||
return
|
||||
}
|
||||
if rIcr.Usage != rIcr2.Usage {
|
||||
|
||||
@@ -249,7 +249,7 @@ func computeRateSIntervals(rts []*orderedRate, intervalStart, usage time.Duratio
|
||||
CompressFactor: cmpFactor,
|
||||
Usage: iRtUsage,
|
||||
}
|
||||
if len(rIcmts) != 0 && rIcrm.CompressEquals(rIcmts[len(rIcmts)-1], false) {
|
||||
if len(rIcmts) != 0 && rIcrm.CompressEquals(rIcmts[len(rIcmts)-1]) {
|
||||
rIcmts[len(rIcmts)-1].CompressFactor += rIcrm.CompressFactor
|
||||
} else {
|
||||
rIcmts = append(rIcmts, rIcrm)
|
||||
|
||||
Reference in New Issue
Block a user