Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- don't need to create/destroy GHashTable for each feature query - plugs leak: g_hash_table_unref (features_used) not always called properly - to check 1 feature, don't need to traverse whole GHashTable
- Loading branch information
1 parent
6f6d2fe
commit 8192def
Showing
5 changed files
with
90 additions
and
108 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
/********************************************************************\ | ||
* This program is free software; you can redistribute it and/or * | ||
* modify it under the terms of the GNU General Public License as * | ||
* published by the Free Software Foundation; either version 2 of * | ||
* the License, or (at your option) any later version. * | ||
* * | ||
* This program is distributed in the hope that it will be useful, * | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of * | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * | ||
* GNU General Public License for more details. * | ||
* * | ||
* You should have received a copy of the GNU General Public License* | ||
* along with this program; if not, contact: * | ||
* * | ||
* Free Software Foundation Voice: +1-617-542-5942 * | ||
* 51 Franklin Street, Fifth Floor Fax: +1-617-542-2652 * | ||
* Boston, MA 02110-1301, USA gnu@gnu.org * | ||
* * | ||
\********************************************************************/ | ||
|
||
#ifndef __QOF_BOOK__HPP__ | ||
#define __QOF_BOOK__HPP__ | ||
|
||
#include <vector> | ||
#include <unordered_map> | ||
#include <string> | ||
|
||
#include "qof.h" | ||
|
||
using FeaturesTable = std::unordered_map<std::string,std::string>; | ||
|
||
std::vector<std::string> | ||
qof_book_get_unknown_features (QofBook *book, const FeaturesTable& features); | ||
bool qof_book_test_feature (QofBook*, const char*); | ||
|
||
#endif /* QOF_BOOK_HPP */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters