diff options
| author | Jasper van de Gronde <jasper.vandegronde@gmail.com> | 2008-07-19 16:15:51 +0000 |
|---|---|---|
| committer | jaspervdg <jaspervdg@users.sourceforge.net> | 2008-07-19 16:15:51 +0000 |
| commit | 43ecdc0b15eba3b0c1cbec9bf8e3cd13133ccb72 (patch) | |
| tree | 394338c507a3ac3c460536ef6c969dd661dc2af4 /src | |
| parent | noop: Refactor massive copy&paste of PdfParser::doShowText, in exchange for u... (diff) | |
| download | inkscape-43ecdc0b15eba3b0c1cbec9bf8e3cd13133ccb72.tar.gz inkscape-43ecdc0b15eba3b0c1cbec9bf8e3cd13133ccb72.zip | |
Added set_int_pref stub to svg/test-stubs.cpp, unit tests build again on
Linux.
(bzr r6366)
Diffstat (limited to 'src')
| -rw-r--r-- | src/svg/test-stubs.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/svg/test-stubs.cpp b/src/svg/test-stubs.cpp index e09e03186..945488300 100644 --- a/src/svg/test-stubs.cpp +++ b/src/svg/test-stubs.cpp @@ -15,11 +15,23 @@ #endif #include "svg/test-stubs.h" +#include <map> +#include <string> + +std::map<std::string,long long int> int_prefs; + +void +prefs_set_int_attribute(gchar const *path, gchar const *attr, long long int val) +{ + int_prefs[std::string(path) + '/' + std::string(attr)] = val; +} long long int prefs_get_int_attribute(gchar const *path, gchar const *attr, long long int def) { - return def; + std::map<std::string,long long int>::const_iterator it=int_prefs.find(std::string(path) + '/' + std::string(attr)); + long long int ret = it==int_prefs.end() ? def : it->second; + return ret; } /* |
