Simplify code

Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
This commit is contained in:
Kamil Kopryk
2021-10-20 00:52:52 +00:00
committed by Compute-Runtime-Automation
parent 61524596e0
commit 9614d435c5
2 changed files with 5 additions and 5 deletions

View File

@ -137,7 +137,7 @@ void Kernel::patchWithImplicitSurface(void *ptrToPatchInCrossThreadData, Graphic
}
void *ssh = getSurfaceStateHeap();
if ((nullptr != ssh) & isValidOffset(arg.bindful)) {
if ((nullptr != ssh) && isValidOffset(arg.bindful)) {
auto surfaceState = ptrOffset(ssh, arg.bindful);
void *addressToPatch = reinterpret_cast<void *>(allocation.getGpuAddressToPatch());
size_t sizeToPatch = allocation.getUnderlyingBufferSize();

View File

@ -214,7 +214,7 @@ inline const ArgDescValue &ArgDescriptor::as<ArgDescValue>() const {
template <>
inline ArgDescPointer &ArgDescriptor::as<ArgDescPointer>(bool initIfUnknown) {
if ((ArgTUnknown == type) & initIfUnknown) {
if ((ArgTUnknown == type) && initIfUnknown) {
this->type = ArgTPointer;
this->asPointer = {};
}
@ -224,7 +224,7 @@ inline ArgDescPointer &ArgDescriptor::as<ArgDescPointer>(bool initIfUnknown) {
template <>
inline ArgDescImage &ArgDescriptor::as<ArgDescImage>(bool initIfUnknown) {
if ((ArgTUnknown == type) & initIfUnknown) {
if ((ArgTUnknown == type) && initIfUnknown) {
this->type = ArgTImage;
this->asImage = {};
}
@ -234,7 +234,7 @@ inline ArgDescImage &ArgDescriptor::as<ArgDescImage>(bool initIfUnknown) {
template <>
inline ArgDescSampler &ArgDescriptor::as<ArgDescSampler>(bool initIfUnknown) {
if ((ArgTUnknown == type) & initIfUnknown) {
if ((ArgTUnknown == type) && initIfUnknown) {
this->type = ArgTSampler;
this->asSampler = {};
}
@ -244,7 +244,7 @@ inline ArgDescSampler &ArgDescriptor::as<ArgDescSampler>(bool initIfUnknown) {
template <>
inline ArgDescValue &ArgDescriptor::as<ArgDescValue>(bool initIfUnknown) {
if ((ArgTUnknown == type) & initIfUnknown) {
if ((ArgTUnknown == type) && initIfUnknown) {
this->type = ArgTValue;
this->asByValue = {};
}