From 02a4e87a25cd4bb3cbc028ef7d31d75833b5ec5a Mon Sep 17 00:00:00 2001 From: William S Fulton Date: Tue, 4 Oct 2005 20:38:57 +0000 Subject: [PATCH] Fix ruby warnings git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7591 626c5289-ae23-0410-ae9c-e8d60b6d4f22 --- Examples/test-suite/compactdefaultargs.i | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/Examples/test-suite/compactdefaultargs.i b/Examples/test-suite/compactdefaultargs.i index a4462245d..54ad22a45 100644 --- a/Examples/test-suite/compactdefaultargs.i +++ b/Examples/test-suite/compactdefaultargs.i @@ -5,11 +5,11 @@ // The following should compile with compactdefaultargs off %inline %{ class Defaults1 { - static const int private_default = -1; + static const int PRIVATE_DEFAULT = -1; public: - static const double public_default = -1.0; - Defaults1(int a = private_default) {} - double ret(double d = public_default) { return d; } + static const double PUBLIC_DEFAULT = -1.0; + Defaults1(int a = PRIVATE_DEFAULT) {} + double ret(double d = PUBLIC_DEFAULT) { return d; } }; %} @@ -17,16 +17,16 @@ public: // compactdefaultargs now on by default %feature("compactdefaultargs"); -// Turn compactdefaultargs off for the ret method which can't work with this feature -%feature("compactdefaultargs", "0") Defaults2(int a = private_default); +// Turn compactdefaultargs off for the constructor which can't work with this feature +%feature("compactdefaultargs", "0") Defaults2(int a = PRIVATE_DEFAULT); %inline %{ class Defaults2 { - static const int private_default = -1; + static const int PRIVATE_DEFAULT = -1; public: - static const double public_default = -1.0; - Defaults2(int a = private_default) {} - double ret(double d = public_default) { return d; } + static const double PUBLIC_DEFAULT = -1.0; + Defaults2(int a = PRIVATE_DEFAULT) {} + double ret(double d = PUBLIC_DEFAULT) { return d; } }; %}