/*
- * Copyright (c) 2022 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2024 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
{
// If we find "{","}" pair but can't find matched constant
// try to find other "{","}" pair after current left position.
- pos = leftPos + 1;
+ pos = rightPos + 1;
for(uint32_t i = 0; i < mReplacementMap.Count(); i++)
{
if(0 == stringConfigValue.compare(leftPos + 1, rightPos - leftPos - 1, constant.stringKey))
{
std::string replaceString;
- mReplacementMap.GetValue(i).Get(replaceString);
-
- stringConfigValue.replace(leftPos, rightPos - leftPos + 1, replaceString);
- pos = leftPos + replaceString.size();
- break;
+ if(DALI_LIKELY(mReplacementMap.GetValue(i).Get(replaceString)))
+ {
+ stringConfigValue.replace(leftPos, rightPos - leftPos + 1, replaceString);
+ pos = leftPos + replaceString.size();
+ break;
+ }
}
}
}