Skip to content

Commit 78a76c2

Browse files
committed
Functions always returned true, so make them void
1 parent c031111 commit 78a76c2

File tree

2 files changed

+6
-9
lines changed

2 files changed

+6
-9
lines changed

SnippetsDB.cpp

+3-6
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ void SnippetsDB::Open()
6969
/////////////////////////////////////////////////////////////////////////////
7070
//
7171

72-
bool SnippetsDB::ImportLibrary(LPCWSTR db, int orgLibID)
72+
void SnippetsDB::ImportLibrary(LPCWSTR db, int orgLibID)
7373
{
7474
// Start with attaching the database
7575
Attach(db, L"Import");
@@ -91,13 +91,12 @@ bool SnippetsDB::ImportLibrary(LPCWSTR db, int orgLibID)
9191
stmt.Finalize();
9292

9393
Detach(L"Import");
94-
return true;
9594
}
9695

9796
/////////////////////////////////////////////////////////////////////////////
9897
//
9998

100-
bool SnippetsDB::ImportSnippets(int orgLibID, int newLibID)
99+
void SnippetsDB::ImportSnippets(int orgLibID, int newLibID)
101100
{
102101
// Get all the snippets from the attached database
103102
SqliteStatement stmt(g_db, "SELECT * FROM Import.Snippets WHERE LibraryID = @libid");
@@ -113,13 +112,12 @@ bool SnippetsDB::ImportSnippets(int orgLibID, int newLibID)
113112
snip.SaveToDB(false);
114113
}
115114
stmt.Finalize();
116-
return true;
117115
}
118116

119117
/////////////////////////////////////////////////////////////////////////////
120118
//
121119

122-
bool SnippetsDB::ImportLanguages(int orgLibID, int newLibID)
120+
void SnippetsDB::ImportLanguages(int orgLibID, int newLibID)
123121
{
124122
// Get all the languages for this library from the attached database
125123
SqliteStatement stmtSelect(g_db, "SELECT Lang FROM Import.LibraryLang WHERE LibraryID = @libid");
@@ -139,7 +137,6 @@ bool SnippetsDB::ImportLanguages(int orgLibID, int newLibID)
139137
}
140138
stmtSelect.Finalize();
141139
stmtInsert.Finalize();
142-
return true;
143140
}
144141

145142
/////////////////////////////////////////////////////////////////////////////

SnippetsDB.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -32,16 +32,16 @@ class SnippetsDB : public SqliteDatabase
3232
virtual void Open();
3333
void CreateExportDB();
3434

35-
bool ImportLibrary(LPCWSTR db, int orgLibID);
35+
void ImportLibrary(LPCWSTR db, int orgLibID);
3636

3737
protected:
3838
void SetValues();
3939
void UpgradeDatabase_1_2();
4040
void UpgradeDatabase_2_3();
4141
bool CheckDBVersion();
4242

43-
bool ImportSnippets(int orgLibID, int newLibID);
44-
bool ImportLanguages(int orgLibID, int newLibID);
43+
void ImportSnippets(int orgLibID, int newLibID);
44+
void ImportLanguages(int orgLibID, int newLibID);
4545
};
4646

4747
extern SnippetsDB* g_db;

0 commit comments

Comments
 (0)