From 4f9e90f74eef8a352bb822fbdf702d4da644ff0f Mon Sep 17 00:00:00 2001 From: Cedric Sirianni Date: Fri, 20 Oct 2023 18:55:02 -0400 Subject: [PATCH] refactor: use better names in printRow --- backend/src/database.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/backend/src/database.cpp b/backend/src/database.cpp index 06ba609..b45c756 100644 --- a/backend/src/database.cpp +++ b/backend/src/database.cpp @@ -5,11 +5,11 @@ namespace { // https://stackoverflow.com/questions/31146713/sqlite3-exec-callback-function-clarification - static int printRow(void *unused, int count, char **data, char **columns) + static int printRow(void *unused, int width, char **data, char **attributes) { - for (int i = 0; i < count; i++) + for (int i = 0; i < width; i++) { - printf("%s = %s\n", columns[i], data[i] ? data[i] : "NULL"); + printf("%s = %s\n", attributes[i], data[i] ? data[i] : "NULL"); } printf("\n"); return 0;