@@ -41,12 +41,12 @@ class LastClickRule
41
41
ConditionalVector<uint32_t , usingBatch> thresholdNDaysClick;
42
42
if constexpr (usingBatch) {
43
43
for (size_t i = 0 ; i < tp.ts .size (); ++i) {
44
- bool isValidClick = tp.isClick .at (i) & (tp.ts .at (i) > 0 );
44
+ bool isValidClick = tp.isClick .at (i) && (tp.ts .at (i) > 0 );
45
45
uint32_t thresholdNDays = tp.ts .at (i) + threshold_.count ();
46
46
thresholdNDaysClick.push_back (isValidClick ? thresholdNDays : 0 );
47
47
}
48
48
} else {
49
- bool isValidClick = tp.isClick & (tp.ts > 0 );
49
+ bool isValidClick = tp.isClick && (tp.ts > 0 );
50
50
uint32_t thresholdNDays = tp.ts + threshold_.count ();
51
51
thresholdNDaysClick = isValidClick ? thresholdNDays : 0 ;
52
52
}
@@ -106,9 +106,9 @@ class LastTouch_ClickNDays_ImpressionMDays
106
106
const PrivateConversion<schedulerId, usingBatch, inputEncryption>& conv,
107
107
const std::vector<SecTimestamp<schedulerId, usingBatch>>& thresholds)
108
108
const override {
109
- auto validConv = tp.ts < conv.ts ;
110
- auto touchWithinMDays = conv.ts <= thresholds.at (0 );
111
- auto clickWithinNDays = conv.ts <= thresholds.at (1 );
109
+ const auto validConv = tp.ts < conv.ts ;
110
+ const auto touchWithinMDays = conv.ts <= thresholds.at (0 );
111
+ const auto clickWithinNDays = conv.ts <= thresholds.at (1 );
112
112
113
113
return validConv & (touchWithinMDays | clickWithinNDays);
114
114
}
@@ -120,7 +120,7 @@ class LastTouch_ClickNDays_ImpressionMDays
120
120
if constexpr (usingBatch) {
121
121
for (size_t i = 0 ; i < tp.ts .size (); ++i) {
122
122
bool isValid = tp.ts .at (i) > 0 ;
123
- bool isValidClick = tp.isClick .at (i) & isValid;
123
+ bool isValidClick = tp.isClick .at (i) && isValid;
124
124
125
125
auto thresholdMDays = tp.ts .at (i) + impressionThreshold_.count ();
126
126
thresholdMDaysTouch.push_back (isValid ? thresholdMDays : 0 );
@@ -130,7 +130,7 @@ class LastTouch_ClickNDays_ImpressionMDays
130
130
}
131
131
} else {
132
132
bool isValid = tp.ts > 0 ;
133
- bool isValidClick = tp.isClick & isValid;
133
+ bool isValidClick = tp.isClick && isValid;
134
134
135
135
auto thresholdMDays = tp.ts + impressionThreshold_.count ();
136
136
thresholdMDaysTouch = isValid ? thresholdMDays : 0 ;
@@ -221,7 +221,7 @@ class LastClick_2_7Days
221
221
222
222
if constexpr (usingBatch) {
223
223
for (size_t i = 0 ; i < tp.ts .size (); ++i) {
224
- bool isValidClick = tp.isClick .at (i) & (tp.ts .at (i) > 0 );
224
+ bool isValidClick = tp.isClick .at (i) && (tp.ts .at (i) > 0 );
225
225
uint32_t lowerBoundOneDay = tp.ts .at (i) + kSecondsInOneDay ;
226
226
uint32_t upperBoundSevenDays = tp.ts .at (i) + kSecondsInSevenDays ;
227
227
@@ -230,7 +230,7 @@ class LastClick_2_7Days
230
230
isValidClick ? upperBoundSevenDays : 0 );
231
231
}
232
232
} else {
233
- bool isValidClick = tp.isClick & (tp.ts > 0 );
233
+ bool isValidClick = tp.isClick && (tp.ts > 0 );
234
234
uint32_t lowerBoundOneDay = tp.ts + kSecondsInOneDay ;
235
235
uint32_t upperBoundSevenDays = tp.ts + kSecondsInSevenDays ;
236
236
@@ -322,7 +322,7 @@ class LastTouch_2_7Days
322
322
if constexpr (usingBatch) {
323
323
for (size_t i = 0 ; i < tp.ts .size (); ++i) {
324
324
bool isValid = tp.ts .at (i) > 0 ;
325
- bool isValidClick = tp.isClick .at (i) & isValid;
325
+ bool isValidClick = tp.isClick .at (i) && isValid;
326
326
uint32_t lowerBoundAndUpperBoundOneDay = tp.ts .at (i) + kSecondsInOneDay ;
327
327
uint32_t upperBoundSevenDays = tp.ts .at (i) + kSecondsInSevenDays ;
328
328
@@ -335,14 +335,14 @@ class LastTouch_2_7Days
335
335
}
336
336
} else {
337
337
bool isValid = tp.ts > 0 ;
338
- bool isValidClick = tp.isClick & isValid;
338
+ bool isValidClick = tp.isClick && isValid;
339
339
uint32_t lowerBoundAndUpperBoundOneDay = tp.ts + kSecondsInOneDay ;
340
340
uint32_t upperBoundSevenDays = tp.ts + kSecondsInSevenDays ;
341
341
342
342
lowerBoundOneDayClick = isValidClick ? lowerBoundAndUpperBoundOneDay : 0 ;
343
343
upperBoundSevenDaysClick = isValidClick ? upperBoundSevenDays : 0 ;
344
344
upperBoundOneDayTouch =
345
- (isValid & !isValidClick) ? lowerBoundAndUpperBoundOneDay : 0 ;
345
+ (isValid && !isValidClick) ? lowerBoundAndUpperBoundOneDay : 0 ;
346
346
}
347
347
348
348
return std::vector<SecTimestamp<schedulerId, usingBatch>>{
@@ -421,12 +421,12 @@ class LastClick_1Day_TargetId
421
421
ConditionalVector<uint32_t , usingBatch> thresholdOneDayClick;
422
422
if constexpr (usingBatch) {
423
423
for (size_t i = 0 ; i < tp.ts .size (); ++i) {
424
- bool isValidClick = tp.isClick .at (i) & (tp.ts .at (i) > 0 );
424
+ bool isValidClick = tp.isClick .at (i) && (tp.ts .at (i) > 0 );
425
425
uint32_t thresholdOneDay = tp.ts .at (i) + kSecondsInOneDay ;
426
426
thresholdOneDayClick.push_back (isValidClick ? thresholdOneDay : 0 );
427
427
}
428
428
} else {
429
- bool isValidClick = tp.isClick & (tp.ts > 0 );
429
+ bool isValidClick = tp.isClick && (tp.ts > 0 );
430
430
uint32_t thresholdOneDay = tp.ts + kSecondsInOneDay ;
431
431
thresholdOneDayClick = isValidClick ? thresholdOneDay : 0 ;
432
432
}
0 commit comments