mirror of
https://github.com/Evolution-X/hardware_interfaces
synced 2026-02-01 10:44:41 +00:00
Don't use String8::empty
With the current definition, it's an alias of default constructor. This has very different meaning from std::string empty, especially that static method String8::empty can still be called from instance context. One of such bugs are present in in ParametersUtil. Bug: 295394788 Test: make checkbuild Change-Id: I9116a0c42a6a9e94116eaaaa0fd60568db428838
This commit is contained in:
@@ -51,7 +51,7 @@ Result ParametersUtil::getParam(const char* name, bool* value) {
|
||||
Result retval = getParam(name, &halValue);
|
||||
*value = false;
|
||||
if (retval == Result::OK) {
|
||||
if (halValue.empty()) {
|
||||
if (halValue.length() == 0) {
|
||||
return Result::NOT_SUPPORTED;
|
||||
}
|
||||
*value = !(halValue == AudioParameter::valueOff);
|
||||
|
||||
Reference in New Issue
Block a user