From 8ab11d96e6db9bb5fbb192d655b0b10dd662967b Mon Sep 17 00:00:00 2001 From: novel Date: Sun, 17 Jun 2007 05:43:07 +0000 Subject: Fix build with gcc42. PR: 112821 Submitted by: Henrik Brix Andersen Obtained from: Gentoo Linux Bugzilla (bug 135504) --- x11-wm/fbpager/files/patch-Resources.hh | 76 +++++++++++++++++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100644 x11-wm/fbpager/files/patch-Resources.hh (limited to 'x11-wm/fbpager') diff --git a/x11-wm/fbpager/files/patch-Resources.hh b/x11-wm/fbpager/files/patch-Resources.hh new file mode 100644 index 000000000000..69c16d326761 --- /dev/null +++ b/x11-wm/fbpager/files/patch-Resources.hh @@ -0,0 +1,76 @@ +--- src/Resources.hh ++++ src/Resources.hh +@@ -8,8 +8,10 @@ + #include + #include + ++namespace FbTk { ++ + template<> +-void FbTk::Resource:: ++void Resource:: + setFromString(char const *strval) { + if (strcasecmp(strval, "true") == 0 || + strcasecmp(strval, "yes") == 0) +@@ -19,38 +21,37 @@ + } + + template<> +-std::string FbTk::Resource:: ++std::string Resource:: + getString() { + return std::string(**this == true ? "true" : "false"); + } + + template <> +-void FbTk::Resource::setFromString(const char *str) { ++void Resource::setFromString(const char *str) { + *(*this) = (str ? str : ""); + } + + template <> +-std::string FbTk::Resource::getString() { ++std::string Resource::getString() { + return *(*this); + } + + template <> +-void FbTk::Resource::setFromString(const char *str) { ++void Resource::setFromString(const char *str) { + if (str == 0) + return; + sscanf(str, "%d", &(*(*this))); + } + + template <> +-std::string FbTk::Resource::getString() { ++std::string Resource::getString() { + char buff[16]; + sprintf(buff, "%d", (*(*this))); + return std::string(buff); + } + +-namespace FbPager { + template <> +-void FbTk::Resource::setFromString(const char *str) { ++void Resource::setFromString(const char *str) { + if (strcmp("TopToBottom", str) == 0) + *(*this) = FbPager::FbPager::TOP_TO_BOTTOM; + else +@@ -58,7 +59,7 @@ + } + + template <> +-std::string FbTk::Resource::getString() { ++std::string Resource::getString() { + switch (*(*this)) { + case FbPager::FbPager::LEFT_TO_RIGHT: + return "LeftToRight"; +@@ -67,6 +68,6 @@ + } + } + +-} // end namespace FbPager ++} // end namespace FbTk + + #endif // RESOURCES -- cgit