Skip to content

Commit

Permalink
fix simplkv clang error
Browse files Browse the repository at this point in the history
  • Loading branch information
Forairaaaaa committed Nov 7, 2023
1 parent e093836 commit 6961e44
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions example/framework/simplekv_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,20 +62,20 @@ int main()
/* -------------------------------------------------------------- */
printf("\n[Array]\n");

uint16_t data[10] = {0, 3, 6, 9, 12, 15, 18, 21, 24, 27};
int data[10] = {0, 3, 6, 9, 12, 15, 18, 21, 24, 27};

db.Add("Data", data);

for (int i = 0; i < 10; i++)
{
printf("%d ", db.Get("Data")->value<uint16_t*>()[i]);
printf("%d ", db.Get("Data")->value<int*>()[i]);
}
printf("\n");
// > 0 3 6 9 12 15 18 21 24 27

for (int i = 0; i < 10; i++)
{
if (db.Get("Data")->value<uint16_t*>()[i] != data[i])
if (db.Get("Data")->value<int*>()[i] != data[i])
return -1;
}
/* -------------------------------------------------------------- */
Expand Down

0 comments on commit 6961e44

Please sign in to comment.