Enable readability-container-data-pointer
Clang tidy check, and fix the one case.
Change-Id: I0935eb6403fd3b2e1a66d9e097febd292f61d70d
Signed-off-by: Ed Tanous <ed@tanous.net>
diff --git a/.clang-tidy b/.clang-tidy
index 46561c1..db16910 100644
--- a/.clang-tidy
+++ b/.clang-tidy
@@ -267,6 +267,7 @@
readability-avoid-const-params-in-decls,
readability-braces-around-statements,
readability-const-return-type,
+readability-container-data-pointer,
readability-container-size-empty,
readability-convert-member-functions-to-static,
readability-delete-null-pointer,
diff --git a/src/IntelCPUSensorMain.cpp b/src/IntelCPUSensorMain.cpp
index b9ee586..2976ade 100644
--- a/src/IntelCPUSensorMain.cpp
+++ b/src/IntelCPUSensorMain.cpp
@@ -545,7 +545,7 @@
// NOLINTNEXTLINE(cppcoreguidelines-pro-type-vararg)
if (peci_RdPkgConfig(config.addr, PECI_MBX_INDEX_DDR_DIMM_TEMP,
- rank, 4, &pkgConfig[0],
+ rank, 4, pkgConfig.data(),
&cc) == PECI_CC_SUCCESS)
{
// Depending on CPU generation, both 0 and 0xFF can be used
@@ -583,7 +583,7 @@
uint8_t cc = 0;
if (peci_RdPkgConfig(config.addr, PECI_MBX_INDEX_CPU_ID, 0,
- 4, &pkgConfig[0],
+ 4, pkgConfig.data(),
&cc) == PECI_CC_SUCCESS)
{
std::cout << config.name << " is detected\n";