]> git.ipfire.org Git - thirdparty/snapper.git/commitdiff
- move functions to snapper namespace 955/head
authorArvin Schnell <aschnell@suse.de>
Wed, 6 Nov 2024 14:31:52 +0000 (15:31 +0100)
committerArvin Schnell <aschnell@suse.de>
Wed, 6 Nov 2024 14:31:52 +0000 (15:31 +0100)
client/utils/HumanString.cc
client/utils/equal-date.cc
client/utils/equal-date.h
client/utils/text.cc
client/utils/text.h

index 028e3e8578d50545ed36a94e0e130c6720d9b39e..5307b15eedb69a31e1087072ce659c3b27bd72b9 100644 (file)
@@ -55,7 +55,7 @@ namespace snapper
     vector<string>
     get_all_suffixes(int i, bool all = true, bool classic = false)
     {
-       auto _ = [classic](const char* msg) { return classic ? msg : ::_(msg); };
+       auto _ = [classic](const char* msg) { return classic ? msg : snapper::_(msg); };
 
        vector<string> ret;
 
index e0c334f785058c7d01396e52fb92f383a8d6fb7f..0e32547cfcb1ef0b0cdacf5b14de2e21514e267e 100644 (file)
 
 #include "equal-date.h"
 
+
 #define isleapyear(year) \
     ((year) % 4 == 0 && ((year) % 100 != 0 || (year) % 400 == 0))
 
+
+namespace snapper
+{
+
 int
 yday_of_weeks_monday(const struct tm& tmp)
 {
@@ -90,3 +95,5 @@ equal_hour(const struct tm& tmp1, const struct tm& tmp2)
 {
     return equal_day(tmp1, tmp2) && tmp1.tm_hour == tmp2.tm_hour;
 }
+
+}
index 45cf9b2563efe7db4bee9116ce45913a7cd885e0..6b4e7da4ebbd32b11e39584f94aa14c8aa99c404 100644 (file)
@@ -20,6 +20,8 @@
  */
 
 
+namespace snapper
+{
 
 bool
 equal_year(const struct tm& tmp1, const struct tm& tmp2);
@@ -39,3 +41,4 @@ equal_day(const struct tm& tmp1, const struct tm& tmp2);
 bool
 equal_hour(const struct tm& tmp1, const struct tm& tmp2);
 
+}
index b593e7c25f0e11bee3bec79abbcd7a06c3504dac..26bb4590f2c5f6658550672bf8413717913d936f 100644 (file)
 
 #include "text.h"
 
+
+namespace snapper
+{
+
 using namespace std;
 
 
@@ -160,3 +164,5 @@ std::string mbs_substr_by_width(
     return string();
   return string(sptr, eptr - sptr);
 }
+
+}
index eb3017814d9bed28ed38e86b205bb6fd59749dfc..80e2e15276ea9ae1fb051cd776f21206b4fc98aa 100644 (file)
 #include <string>
 #include <iosfwd>
 
+
+namespace snapper
+{
+
 const char* _(const char* msgid) __attribute__ ((format_arg(1)));
 
 const char* _(const char* msgid, const char* msgid_plural, unsigned long int n)
@@ -29,4 +33,6 @@ std::string mbs_substr_by_width(
     std::string::size_type pos,
     std::string::size_type n = std::string::npos);
 
-#endif /* ZYPPER_UTILS_TEXT_H_ */
+}
+
+#endif