From: jaspervdg Date: Sat, 19 Jul 2008 16:15:51 +0000 (+0000) Subject: Added set_int_pref stub to svg/test-stubs.cpp, unit tests build again on X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=ef8c3d41de893c393dedd1b0c5d8e81de7abc6f9;p=inkscape.git Added set_int_pref stub to svg/test-stubs.cpp, unit tests build again on Linux. --- 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 +#include + +std::map 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::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; } /*