mirror of
https://github.com/joel16/VITA-Homebrew-Sorter.git
synced 2024-11-26 21:00:27 +00:00
app: Remove unused code
This commit is contained in:
parent
bed515818f
commit
b12dc03dea
@ -1,40 +0,0 @@
|
||||
#include <psp2/kernel/clib.h>
|
||||
|
||||
#include "dbbrowser.h"
|
||||
#include "log.h"
|
||||
#include "sqlite3.h"
|
||||
#include "utils.h"
|
||||
|
||||
namespace DBBrowser {
|
||||
int GetTables(std::vector<std::string> &tables) {
|
||||
sqlite3 *db = nullptr;
|
||||
|
||||
int ret = sqlite3_open_v2(db_path, &db, SQLITE_OPEN_READWRITE, nullptr);
|
||||
if (ret != SQLITE_OK) {
|
||||
Log::Error("sqlite3_open_v2 failed to open %s\n", db_path);
|
||||
return ret;
|
||||
}
|
||||
|
||||
std::string query = std::string("SELECT tbl_name FROM sqlite_schema WHERE type = 'table';");
|
||||
|
||||
sqlite3_stmt *stmt = nullptr;
|
||||
ret = sqlite3_prepare_v2(db, query.c_str(), -1, &stmt, nullptr);
|
||||
|
||||
while ((ret = sqlite3_step(stmt)) == SQLITE_ROW) {
|
||||
char res[64];
|
||||
sceClibSnprintf(res, 64, "%s", sqlite3_column_text(stmt, 0));
|
||||
tables.push_back(res);
|
||||
}
|
||||
|
||||
if (ret != SQLITE_DONE) {
|
||||
sqlite3_finalize(stmt);
|
||||
sqlite3_close(db);
|
||||
return ret;
|
||||
}
|
||||
|
||||
sqlite3_finalize(stmt);
|
||||
sqlite3_close(db);
|
||||
return 0;
|
||||
}
|
||||
|
||||
}
|
11
dbbrowser.h
11
dbbrowser.h
@ -1,11 +0,0 @@
|
||||
#ifndef _VITA_HB_SORTER_DB_BROWSER_H_
|
||||
#define _VITA_HB_SORTER_DB_BROWSER_H_
|
||||
|
||||
#include <vector>
|
||||
#include <string>
|
||||
|
||||
namespace DBBrowser {
|
||||
int GetTables(std::vector<std::string> &tables);
|
||||
}
|
||||
|
||||
#endif
|
Loading…
Reference in New Issue
Block a user