ISO C++ doesn't allow default arguments on friends, if it isn't a
declaration.
This commit is contained in:
parent
9693673626
commit
a85e0152b5
2 changed files with 31 additions and 1 deletions
|
@ -1,4 +1,4 @@
|
|||
$NetBSD: distinfo,v 1.10 2008/10/02 14:33:58 joerg Exp $
|
||||
$NetBSD: distinfo,v 1.11 2013/07/18 12:06:10 joerg Exp $
|
||||
|
||||
SHA1 (vfu-3.04.src.tar.gz) = 75e87d102114dc08136420e7927e687f72a52dfd
|
||||
RMD160 (vfu-3.04.src.tar.gz) = a0d1ba84d9c66216b444226ceace190ada0e795a
|
||||
|
@ -15,3 +15,4 @@ SHA1 (patch-ai) = 4a161a1df84001bdefc81384128ea74bf9d7f61d
|
|||
SHA1 (patch-aj) = 265fbb0873ce0b910ba6a53da57a18269af34b82
|
||||
SHA1 (patch-ak) = cfcfb94f1ba6169ef471ae47fdcd9ccc81196a39
|
||||
SHA1 (patch-al) = bd947171f2027243bebe889c537426124459e2e1
|
||||
SHA1 (patch-vslib_vstring.h) = d93cb8362ad11d0a62acaf8ab56e4aace0fd4f7f
|
||||
|
|
29
misc/vfu/patches/patch-vslib_vstring.h
Normal file
29
misc/vfu/patches/patch-vslib_vstring.h
Normal file
|
@ -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)
|
Loading…
Reference in a new issue