Cleanup: Replace C-only deprecated headers

This replaces headers deprecated by C++14 with their equivalent
replacement
This commit is contained in:
Seth Hillbrand 2019-12-05 06:03:15 -08:00
parent a2edf9c442
commit 4d2e953f42
58 changed files with 114 additions and 115 deletions

View File

@ -30,9 +30,9 @@
#ifndef _3D_FASTMATH_H
#define _3D_FASTMATH_H
#include <string.h>
#include <stdint.h>
#include <cmath>
#include <cstdint>
#include <cstring>
// Define this flag to use fast math optimizations

View File

@ -68,10 +68,10 @@
#include "cbvh_pbrt.h"
#include "../../../3d_fastmath.h"
#include <vector>
#include <boost/range/algorithm/partition.hpp>
#include <boost/range/algorithm/nth_element.hpp>
#include <stdlib.h>
#include <boost/range/algorithm/partition.hpp>
#include <cstdlib>
#include <vector>
#include <stack>
#include <wx/debug.h>

View File

@ -71,8 +71,8 @@
#define _CBVH_PBRT_H_
#include "caccelerator.h"
#include <cstdint>
#include <list>
#include <stdint.h>
// Forward Declarations
struct BVHBuildNode;

View File

@ -28,7 +28,7 @@
*/
#include "ccontainer.h"
#include <stdio.h>
#include <cstdio>
CGENERICCONTAINER::CGENERICCONTAINER()
{

View File

@ -32,7 +32,7 @@
#ifndef _MORTONCODES_H_
#define _MORTONCODES_H_
#include <stdint.h>
#include <cstdint>
uint32_t EncodeMorton2( uint32_t x, uint32_t y );
uint32_t EncodeMorton3( uint32_t x, uint32_t y, uint32_t z );

View File

@ -30,7 +30,7 @@
#include "ray.h"
#include "../../3d_fastmath.h"
#include <stdio.h>
#include <cstdio>
#include <wx/debug.h>
#include <cmath>

View File

@ -28,7 +28,7 @@
*/
#include "cobject2d.h"
#include <stdio.h>
#include <cstdio>
COBJECT2D_STATS *COBJECT2D_STATS::s_instance = 0;

View File

@ -31,7 +31,7 @@
#define _COBJECT2D_H_
#include "cbbox2d.h"
#include <string.h>
#include <cstring>
#include <class_board_item.h>

View File

@ -29,7 +29,7 @@
#include "3d_fastmath.h"
#include "cbbox.h"
#include <stdio.h>
#include <cstdio>
#include <wx/debug.h> // For the wxASSERT

View File

@ -28,7 +28,7 @@
*/
#include "cobject.h"
#include <stdio.h>
#include <cstdio>
COBJECT3D_STATS *COBJECT3D_STATS::s_instance = 0;

View File

@ -29,7 +29,7 @@
#include "cimage.h"
#include "buffers_debug.h"
#include <string.h> // For memcpy
#include <cstring> // For memcpy
#include <atomic>
#include <thread>

View File

@ -23,12 +23,12 @@
*/
#include <algorithm> // std::max
#include <cerrno>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <string>
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <vector>
#include <common.h>

View File

@ -18,8 +18,8 @@
*/
#include "math.h"
#include "dialog_color_picker.h"
#include <cmath>
#define ALPHA_MAX 100 // the max value returned by the alpha (opacity) slider

View File

@ -23,9 +23,9 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <string.h>
#include <richio.h>
#include <cstring>
#include <filter_reader.h>
#include <richio.h>
FILTER_READER::FILTER_READER( LINE_READER& aReader ) :

View File

@ -22,8 +22,8 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <cmath>
#include <math/vector2d.h>
#include <math.h>
#include <geometry/shape.h>
#include <geometry/shape_arc.h>

View File

@ -45,7 +45,7 @@ unsigned GetRunningMicroSecs()
#elif defined(HAVE_CLOCK_GETTIME)
#include <time.h>
#include <ctime>
unsigned GetRunningMicroSecs()
{

View File

@ -25,11 +25,11 @@
#include <kicad_curl/kicad_curl.h>
#include <kicad_curl/kicad_curl_easy.h>
#include <cstdarg>
#include <cstddef>
#include <exception>
#include <stdarg.h>
#include <sstream>
#include <ki_exception.h> // THROW_IO_ERROR
#include <sstream>
static size_t write_callback( void* contents, size_t size, size_t nmemb, void* userp )

View File

@ -22,7 +22,7 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <string.h>
#include <cstring>
#include <macros.h>
#include <kiway.h>

View File

@ -3,10 +3,10 @@
*/
/* First off, code is included that follows the "include" declaration
** in the input grammar file. */
#include <stdio.h>
#include <cstdio>
#line 28 "grammar.lemon"
#include <assert.h>
#include <cassert>
#include <libeval/numeric_evaluator.h>
#line 12 "grammar.c"
/* Next is all token values, in a form suitable for use by makeheaders.
@ -236,7 +236,7 @@ struct yyParser {
typedef struct yyParser yyParser;
#ifndef NDEBUG
#include <stdio.h>
#include <cstdio>
static FILE *yyTraceFILE = 0;
static char *yyTracePrompt = 0;
#endif /* NDEBUG */

View File

@ -23,8 +23,8 @@
*/
#include <stdarg.h>
#include <assert.h>
#include <cassert>
#include <cstdarg>
#include <layers_id_colors_and_visibility.h>
#include <class_board.h>

View File

@ -29,7 +29,7 @@
#include <boost/property_tree/ptree.hpp>
#include <assert.h>
#include <cassert>
#include <ptree.h>
typedef PTREE::const_iterator CITER;

View File

@ -13,8 +13,8 @@
http://www.boost.org/LICENSE_1_0.txt)
*/
#include <stdlib.h>
#include <setjmp.h>
#include <csetjmp>
#include <cstdlib>
#include <system/libcontext.h>
#if defined(LIBCONTEXT_PLATFORM_windows_i386) && defined(LIBCONTEXT_COMPILER_gcc)

View File

@ -33,7 +33,7 @@
#include <richio.h>
*/
#include <assert.h>
#include <cassert>
/*

View File

@ -20,9 +20,9 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <ctype.h>
#include <algorithm>
#include <boost/algorithm/string/join.hpp>
#include <cctype>
#include <wx/mstream.h>
#include <wx/filename.h>

View File

@ -27,7 +27,7 @@
#define DLIST_H_
#include <stdio.h> // NULL definition.
#include <cstdio> // NULL definition.
class EDA_ITEM;

View File

@ -25,10 +25,10 @@
#ifndef DSNLEXER_H_
#define DSNLEXER_H_
#include <stdio.h>
#include <cstdio>
#include <hashtables.h>
#include <string>
#include <vector>
#include <hashtables.h>
#include <richio.h>

View File

@ -28,7 +28,7 @@
#ifndef _EAGLE_PARSER_H_
#define _EAGLE_PARSER_H_
#include <errno.h>
#include <cerrno>
#include <unordered_map>
#include <wx/xml/xml.h>

View File

@ -25,10 +25,10 @@
// NOTE This file compiles under MSVC 6 SP5 and MSVC .Net 2003 it may not work on other compilers without modification.
// NOTE These next few lines may be win32 specific, you may need to modify them to compile on other platform
#include <stdio.h>
#include <math.h>
#include <assert.h>
#include <stdlib.h>
#include <cassert>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <algorithm>
#include <functional>

View File

@ -67,10 +67,9 @@ Supported units are millimeters (mm), Mil (mil) and inch (")
#ifndef NUMERIC_EVALUATOR_H_
#define NUMERIC_EVALUATOR_H_
#include <stddef.h>
#include <string>
#include <string>
#include <cstddef>
#include <map>
#include <string>
#include <base_units.h>

View File

@ -26,7 +26,7 @@
#ifndef __MATH_UTIL_H
#define __MATH_UTIL_H
#include <stdint.h>
#include <cstdint>
/**
* Function rescale()

View File

@ -34,8 +34,8 @@
// I really did not want to be dependent on wxWidgets in richio
// but the errorText needs to be wide char so wxString rules.
#include <cstdio>
#include <wx/wx.h>
#include <stdio.h>
#include <ki_exception.h>

View File

@ -17,9 +17,9 @@
#ifndef __LIBCONTEXT_H
#define __LIBCONTEXT_H
#include <stdint.h>
#include <stdio.h>
#include <stddef.h>
#include <cstddef>
#include <cstdint>
#include <cstdio>
#if defined(__GNUC__) || defined(__APPLE__) || defined(__FreeBSD__)

View File

@ -28,9 +28,9 @@
* @file trigo.h
*/
#include <math.h>
#include <wx/gdicmn.h> // For wxPoint
#include <cmath>
#include <math/vector2d.h>
#include <wx/gdicmn.h> // For wxPoint
/**
* Function IsPointOnSegment

View File

@ -19,9 +19,9 @@
#include "sexpr/sexpr_parser.h"
#include "sexpr/sexpr_exception.h"
#include <cctype>
#include <cstdlib> /* strtod */
#include <iterator>
#include <stdexcept>
#include <stdlib.h> /* strtod */
#include <fstream>
#include <streambuf>

View File

@ -26,8 +26,8 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <limits.h>
#include <algorithm>
#include <climits>
#include <fctsys.h>
#include <common.h>

View File

@ -26,10 +26,10 @@
* Based on the original microstrip.c by Gopal Narayanan
*/
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <units.h>
#include <transline.h>

View File

@ -29,10 +29,10 @@
*/
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <units.h>
#include <transline.h>

View File

@ -23,10 +23,10 @@
*/
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <units.h>
#include <transline.h>

View File

@ -29,10 +29,10 @@
* Based on the original microstrip.c by Gopal Narayanan
*/
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <units.h>
#include <transline.h>

View File

@ -21,9 +21,9 @@
*
*/
#include <stdio.h>
#include <string.h>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <units.h>
#include <transline.h>

View File

@ -22,10 +22,10 @@
*/
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <units.h>
#include <transline.h>

View File

@ -118,7 +118,7 @@ double TRANSLINE::getProperty( enum PRMS_ID aPrmId )
/*
* skin_depth - calculate skin depth
*/
#include <stdio.h>
#include <cstdio>
double TRANSLINE::skin_depth()
{
double depth;

View File

@ -22,10 +22,10 @@
*/
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <units.h>
#include <transline.h>

View File

@ -50,7 +50,7 @@
#include <view/view.h>
#include <stdio.h>
#include <cstdio>
EDGE_MODULE::EDGE_MODULE( MODULE* parent, STROKE_T aShape ) :
DRAWSEGMENT( parent, PCB_MODULE_EDGE_T )

View File

@ -50,7 +50,7 @@ Load() TODO's
*/
#include <errno.h>
#include <cerrno>
#include <wx/string.h>
#include <wx/xml/xml.h>

View File

@ -28,9 +28,9 @@
#include "nanosvg.h"
#include <string.h>
#include <stdlib.h>
#include <math.h>
#include <cmath>
#include <cstdlib>
#include <cstring>
#define NSVG_PI (3.14159265358979323846264338327f)
#define NSVG_KAPPA90 (0.5522847493f) // Length proportional to radius of a cubic bezier handle for 90deg arcs.

View File

@ -66,7 +66,7 @@
nsvgDelete(image);
*/
#include <stdio.h>
#include <cstdio>
enum NSVGpaintType {
NSVG_PAINT_NONE = 0,

View File

@ -58,13 +58,13 @@
*/
#include <cerrno>
#include <cmath>
#include <stdio.h>
#include <string.h>
#include <errno.h>
#include <cstdio>
#include <cstring>
#include <legacy_plugin.h> // implement this here
#include <wx/ffile.h>
#include <wx/string.h>
#include <legacy_plugin.h> // implement this here
#include <kicad_string.h>
#include <macros.h>

View File

@ -27,7 +27,7 @@
* @brief Pcbnew PLUGIN for P-Cad 200x ASCII *.pcb format.
*/
#include <errno.h>
#include <cerrno>
#include <wx/string.h>
#include <wx/filename.h>

View File

@ -27,12 +27,12 @@
* @brief Pcbnew s-expression file format parser implementation.
*/
#include <errno.h>
#include <cerrno>
#include <common.h>
#include <confirm.h>
#include <macros.h>
#include <trigo.h>
#include <title_block.h>
#include <trigo.h>
#include <class_board.h>
#include <class_dimension.h>

View File

@ -22,7 +22,7 @@
#ifndef __TIME_LIMIT_H
#define __TIME_LIMIT_H
#include <stdint.h>
#include <cstdint>
namespace PNS {

View File

@ -27,17 +27,17 @@
*/
#include "pcbnew_action_plugins.h"
#include <python_scripting.h>
#include <stdio.h>
#include <macros.h>
#include <pcbnew_id.h>
#include <menus_helpers.h>
#include <board_commit.h>
#include <class_board.h>
#include <class_drawsegment.h>
#include <class_module.h>
#include <class_track.h>
#include <class_drawsegment.h>
#include <class_zone.h>
#include <board_commit.h>
#include <cstdio>
#include <macros.h>
#include <menus_helpers.h>
#include <pcbnew_id.h>
#include <python_scripting.h>
#include <tool/action_menu.h>
#include <tool/action_toolbar.h>

View File

@ -28,9 +28,9 @@
*/
#include "pcbnew_footprint_wizards.h"
#include <python_scripting.h>
#include <stdio.h>
#include <cstdio>
#include <macros.h>
#include <python_scripting.h>
PYTHON_FOOTPRINT_WIZARD::PYTHON_FOOTPRINT_WIZARD( PyObject* aWizard )

View File

@ -30,17 +30,17 @@
#include <Python.h>
#undef HAVE_CLOCK_GETTIME // macro is defined in Python.h and causes redefine warning
#include <pcbnew_scripting_helpers.h>
#include <pcbnew.h>
#include <pcbnew_id.h>
#include <action_plugin.h>
#include <build_version.h>
#include <class_board.h>
#include <kicad_string.h>
#include <cstdlib>
#include <io_mgr.h>
#include <kicad_string.h>
#include <macros.h>
#include <stdlib.h>
#include <pcb_draw_panel_gal.h>
#include <action_plugin.h>
#include <pcbnew.h>
#include <pcbnew_id.h>
#include <pcbnew_scripting_helpers.h>
static PCB_EDIT_FRAME* s_PcbEditFrame = NULL;

View File

@ -27,9 +27,9 @@
* @brief methods to add scripting capabilities inside pcbnew
*/
#include <cstdlib>
#include <cstring>
#include <python_scripting.h>
#include <stdlib.h>
#include <string.h>
#include <sstream>
#include <fctsys.h>

View File

@ -31,16 +31,16 @@
* #VRML V2.0 utf8
*/
#include <locale.h>
#include <wx/log.h>
#include <wx/filename.h>
#include "richio.h"
#include "plugins/3d/3d_plugin.h"
#include "plugins/3dapi/ifsg_all.h"
#include "wrlproc.h"
#include "richio.h"
#include "vrml1_base.h"
#include "vrml2_base.h"
#include "wrlproc.h"
#include "x3d.h"
#include <clocale>
#include <wx/filename.h>
#include <wx/log.h>
#define PLUGIN_VRML_MAJOR 1

View File

@ -24,7 +24,7 @@
#ifndef GEOM_TEST_UTILS_H
#define GEOM_TEST_UTILS_H
#include <math.h>
#include <cmath>
#include <geometry/seg.h>
#include <geometry/shape_line_chain.h>

View File

@ -27,8 +27,8 @@
#include <wx/log.h>
#include <cmath>
#include <iostream>
#include <math.h>
#include <sstream>