From 97b910d7261c7019404fa53fefedebe6149726f9 Mon Sep 17 00:00:00 2001 From: William S Fulton Date: Wed, 26 Mar 2008 21:04:59 +0000 Subject: [PATCH] Apply patch #1844301 from Monty Taylor to suppress enum constructor unused warnings. git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10324 626c5289-ae23-0410-ae9c-e8d60b6d4f22 --- CHANGES.current | 4 ++++ Lib/java/enums.swg | 3 +++ 2 files changed, 7 insertions(+) diff --git a/CHANGES.current b/CHANGES.current index dfdd793ee..b99e6bbf2 100644 --- a/CHANGES.current +++ b/CHANGES.current @@ -1,6 +1,10 @@ Version 1.3.35 (in progress) ============================ +03/26/2008: wsfulton + [Java] Apply patch #1844301 from Monty Taylor to suppress enum constructor + unused warnings. + 03/26/2008: wsfulton [Python] Apply patch #1924524 from Casey Raymondson which ensures the "No constructor defined" message is displayed when attempting to call a diff --git a/Lib/java/enums.swg b/Lib/java/enums.swg index 2ccb95403..1a8f89b3a 100644 --- a/Lib/java/enums.swg +++ b/Lib/java/enums.swg @@ -92,15 +92,18 @@ throw new IllegalArgumentException("No enum " + $javaclassname.class + " with value " + swigValue); } + @SuppressWarnings("unused") private $javaclassname() { this.swigValue = SwigNext.next++; } + @SuppressWarnings("unused") private $javaclassname(int swigValue) { this.swigValue = swigValue; SwigNext.next = swigValue+1; } + @SuppressWarnings("unused") private $javaclassname($javaclassname swigEnum) { this.swigValue = swigEnum.swigValue; SwigNext.next = this.swigValue+1;