diff options
author | joerg <joerg> | 2013-07-18 12:06:10 +0000 |
---|---|---|
committer | joerg <joerg> | 2013-07-18 12:06:10 +0000 |
commit | c7e62facf47a31fc63a8b99d6a78e88eed38456c (patch) | |
tree | c3e4fdb2a5eb84256e4fafa67da835b20e6c499d /misc/vfu/patches/patch-vslib_vstring.h | |
parent | 4da62c16f5b7a781dbbb80ec8419accfede543c6 (diff) | |
download | pkgsrc-c7e62facf47a31fc63a8b99d6a78e88eed38456c.tar.gz |
ISO C++ doesn't allow default arguments on friends, if it isn't a
declaration.
Diffstat (limited to 'misc/vfu/patches/patch-vslib_vstring.h')
-rw-r--r-- | misc/vfu/patches/patch-vslib_vstring.h | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/misc/vfu/patches/patch-vslib_vstring.h b/misc/vfu/patches/patch-vslib_vstring.h new file mode 100644 index 00000000000..4cc620d08d0 --- /dev/null +++ b/misc/vfu/patches/patch-vslib_vstring.h @@ -0,0 +1,29 @@ +$NetBSD: patch-vslib_vstring.h,v 1.1 2013/07/18 12:06:10 joerg Exp $ + +ISO C++ forbids default arguments on friend definitions that are not +declarations, so split them off. + +--- vslib/vstring.h.orig 2013-07-17 14:05:27.000000000 +0000 ++++ vslib/vstring.h +@@ -180,8 +180,8 @@ + friend String& str_cut ( String& target, const char* charlist ); // does `CutR(charlist);CutL(charlist);' + friend String& str_cut_spc ( String& target ); // does `Cut(" ");' + +- friend String& str_pad ( String& target, int len, char ch = ' ' ); +- friend String& str_comma( String& target, char delim = ',' ); ++ friend String& str_pad ( String& target, int len, char ch); ++ friend String& str_comma( String& target, char delim); + + // next 3 functions are safe! so if you get/set out f the string range! + friend void str_set_ch( String& target, int pos, const char ch ); // sets `ch' char at position `pos' +@@ -209,6 +209,10 @@ + + }; /* end of String class */ + ++ ++ String& str_pad ( String& target, int len, char ch = '='); ++ String& str_comma( String& target, char delim = '='); ++ + /**************************************************************************** + ** + ** STRING Functions (for class String) |