Fix build issue exposed by commit b824051a.

The combination of left over test code in lib_id.h/cpp and the changes
to handle the DEBUG compiler flag correctly on all platforms exposed a
swig issue on debug builds.  Removing the offending test from lib_id.h
resolved the issue.
This commit is contained in:
Wayne Stambaugh 2020-02-07 15:27:48 -05:00
parent 8d6e5953aa
commit e933045663
2 changed files with 4 additions and 16 deletions

View File

@ -3,7 +3,7 @@
* *
* Copyright (C) 2010 SoftPLC Corporation, Dick Hollenbeck <dick@softplc.com> * Copyright (C) 2010 SoftPLC Corporation, Dick Hollenbeck <dick@softplc.com>
* Copyright (C) 2012 Wayne Stambaugh <stambaughw@gmail.com> * Copyright (C) 2012 Wayne Stambaugh <stambaughw@gmail.com>
* Copyright (C) 2010-2018 KiCad Developers, see change_log.txt for contributors. * Copyright (C) 2010-2020 KiCad Developers, see change_log.txt for contributors.
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
@ -435,9 +435,9 @@ bool LIB_ID::isLegalLibNicknameChar( unsigned aUniChar, LIB_ID_TYPE aType )
} }
#if 0 && defined(DEBUG) #if 0
// build this with Debug CMAKE_BUILD_TYPE // @todo Move this test into the unit test framework.
void LIB_ID::Test() void LIB_ID::Test()
{ {
@ -463,12 +463,4 @@ void LIB_ID::Test()
} }
} }
int main( int argc, char** argv )
{
LIB_ID::Test();
return 0;
}
#endif #endif

View File

@ -3,7 +3,7 @@
* *
* Copyright (C) 2010-2012 SoftPLC Corporation, Dick Hollenbeck <dick@softplc.com> * Copyright (C) 2010-2012 SoftPLC Corporation, Dick Hollenbeck <dick@softplc.com>
* Copyright (C) 2012 Wayne Stambaugh <stambaughw@gmail.com> * Copyright (C) 2012 Wayne Stambaugh <stambaughw@gmail.com>
* Copyright (C) 2010-2018 KiCad Developers, see change_log.txt for contributors. * Copyright (C) 2010-2020 KiCad Developers, see change_log.txt for contributors.
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
@ -228,10 +228,6 @@ public:
*/ */
static unsigned FindIllegalLibNicknameChar( const UTF8& aNickname, LIB_ID_TYPE aType ); static unsigned FindIllegalLibNicknameChar( const UTF8& aNickname, LIB_ID_TYPE aType );
#if defined(DEBUG)
static void Test();
#endif
protected: protected:
/** /**
* Tests whether a unicode character is a legal LIB_ID item name character. * Tests whether a unicode character is a legal LIB_ID item name character.