Skip to content

Commit 7b1a8c9

Browse files
committed
Fix build on ToT Clang
ToT Clang complains about the following error: frameworks/native/vulkan/vkjson/vkjson.cc:1211:20: error: call to 'ToJsonValue' is ambiguous 1211 | object_[key] = ToJsonValue(*value); | ^~~~~~~~~~~ frameworks/native/vulkan/vkjson/vkjson.cc:1173:20: note: candidate function [with T = char, N = 63] 1173 | inline Json::Value ToJsonValue(const T (&value)[N]) { | ^ frameworks/native/vulkan/vkjson/vkjson.cc:1178:20: note: candidate function [with N = 63] 1178 | inline Json::Value ToJsonValue(const char (&value)[N]) { | ^ Test: presubmit Bug: 363682086 Change-Id: Ifa4e8e5df715b1adc99343782a44c8fc302554ae
1 parent 0c01454 commit 7b1a8c9

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

vulkan/vkjson/vkjson.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1169,7 +1169,7 @@ inline Json::Value ArrayToJsonValue(uint32_t count, const T* values) {
11691169
return array;
11701170
}
11711171

1172-
template <typename T, unsigned int N>
1172+
template <typename T, size_t N>
11731173
inline Json::Value ToJsonValue(const T (&value)[N]) {
11741174
return ArrayToJsonValue(N, value);
11751175
}
@@ -1293,7 +1293,7 @@ inline bool AsArray(Json::Value* json_value, uint32_t count, T* values) {
12931293
return true;
12941294
}
12951295

1296-
template <typename T, unsigned int N>
1296+
template <typename T, size_t N>
12971297
inline bool AsValue(Json::Value* json_value, T (*value)[N]) {
12981298
return AsArray(json_value, N, *value);
12991299
}

0 commit comments

Comments
 (0)