summaryrefslogtreecommitdiff
path: root/misc/vfu/patches/patch-vslib_vstring.h
blob: 4cc620d08d08957fc3839810a77452f98c452ebc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
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)