Skip to content

Commit

Permalink
Unruly: simply count
Browse files Browse the repository at this point in the history
  • Loading branch information
Brian Haines committed May 13, 2024
1 parent 2b85ca0 commit 9c31ea4
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions adapters/unruly/unruly.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,7 @@ func (a *adapter) MakeBids(internalRequest *openrtb2.BidRequest, externalRequest
}}
}

count := getBidCount(bidResp)
bidResponse := adapters.NewBidderResponseWithBidsCapacity(count)
bidResponse := adapters.NewBidderResponseWithBidsCapacity(len(internalRequest.Imp))

var errs []error
for _, sb := range bidResp.SeatBid {
Expand All @@ -134,14 +133,6 @@ func (a *adapter) MakeBids(internalRequest *openrtb2.BidRequest, externalRequest
return bidResponse, errs
}

func getBidCount(bidResponse openrtb2.BidResponse) int {
c := 0
for _, sb := range bidResponse.SeatBid {
c = c + len(sb.Bid)
}
return c
}

func getMediaTypeForImp(impId string, imps []openrtb2.Imp) (openrtb_ext.BidType, []error) {
var errs []error
var noMatchingImps []string
Expand Down

0 comments on commit 9c31ea4

Please sign in to comment.