Skip to content

Commit bbca1db

Browse files
author
Ivan Karachun
committed
Replace C-style casts with C++ casts
Signed-off-by: Ivan Karachun <ivan.karachun@intel.com>
1 parent 0540ea2 commit bbca1db

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

sycl/source/detail/pi_opencl.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -224,11 +224,11 @@ pi_result OCL(piSamplerCreate)(pi_context context,
224224
for (std::size_t i = 0; sampler_properties && sampler_properties[i] != 0;
225225
++i) {
226226
if (sampler_properties[i] == PI_SAMPLER_INFO_NORMALIZED_COORDS) {
227-
normalizedCoords = (pi_bool)sampler_properties[++i];
227+
normalizedCoords = static_cast<pi_bool>(sampler_properties[++i]);
228228
} else if (sampler_properties[i] == PI_SAMPLER_INFO_ADDRESSING_MODE) {
229-
addressingMode = (pi_sampler_addressing_mode)sampler_properties[++i];
229+
addressingMode = static_cast<pi_sampler_addressing_mode>(sampler_properties[++i]);
230230
} else if (sampler_properties[i] == PI_SAMPLER_INFO_FILTER_MODE) {
231-
filterMode = (pi_sampler_filter_mode)sampler_properties[++i];
231+
filterMode = static_cast<pi_sampler_filter_mode>(sampler_properties[++i]);
232232
} else {
233233
PI_ASSERT(false, "Cannot recognize sampler property");
234234
}

0 commit comments

Comments
 (0)