MLECO-1868: Code static analyzer warnings fixes
Signed-off-by: alexander <alexander.efremov@arm.com>
Change-Id: Ie423e9cad3fabec6ab077ded7236813fe4933dea
diff --git a/source/use_case/kws_asr/src/Wav2LetterPostprocess.cc b/source/use_case/kws_asr/src/Wav2LetterPostprocess.cc
index b173968..ee3aba0 100644
--- a/source/use_case/kws_asr/src/Wav2LetterPostprocess.cc
+++ b/source/use_case/kws_asr/src/Wav2LetterPostprocess.cc
@@ -38,13 +38,13 @@
const bool lastIteration)
{
/* Basic checks. */
- if (!this->_IsInputValid(tensor, axisIdx)) {
+ if (!this->IsInputValid(tensor, axisIdx)) {
return false;
}
/* Irrespective of tensor type, we use unsigned "byte" */
uint8_t* ptrData = tflite::GetTensorData<uint8_t>(tensor);
- const uint32_t elemSz = this->_GetTensorElementSize(tensor);
+ const uint32_t elemSz = this->GetTensorElementSize(tensor);
/* Other sanity checks. */
if (0 == elemSz) {
@@ -58,9 +58,10 @@
/* Which axis do we need to process? */
switch (axisIdx) {
case arm::app::Wav2LetterModel::ms_outputRowsIdx:
- return this->_EraseSectionsRowWise(ptrData,
- elemSz * tensor->dims->data[arm::app::Wav2LetterModel::ms_outputColsIdx],
- lastIteration);
+ return this->EraseSectionsRowWise(ptrData,
+ elemSz *
+ tensor->dims->data[arm::app::Wav2LetterModel::ms_outputColsIdx],
+ lastIteration);
default:
printf_err("Unsupported axis index: %u\n", axisIdx);
}
@@ -68,8 +69,8 @@
return false;
}
- bool Postprocess::_IsInputValid(TfLiteTensor* tensor,
- const uint32_t axisIdx) const
+ bool Postprocess::IsInputValid(TfLiteTensor* tensor,
+ const uint32_t axisIdx) const
{
if (nullptr == tensor) {
return false;
@@ -91,7 +92,7 @@
return true;
}
- uint32_t Postprocess::_GetTensorElementSize(TfLiteTensor* tensor)
+ uint32_t Postprocess::GetTensorElementSize(TfLiteTensor* tensor)
{
switch(tensor->type) {
case kTfLiteUInt8:
@@ -112,7 +113,7 @@
return 0;
}
- bool Postprocess::_EraseSectionsRowWise(
+ bool Postprocess::EraseSectionsRowWise(
uint8_t* ptrData,
const uint32_t strideSzBytes,
const bool lastIteration)