Clean up includes and include guards.

According to the C standard all preprocessor definitions starting
with an underscore are reserved for standard and implementation use,
so don't use those. Also, sort and unique include directives.
This commit is contained in:
whitequark 2018-07-12 18:48:51 +00:00
parent d471e65e7d
commit f54dabbb5f
9 changed files with 33 additions and 34 deletions

View File

@ -1,5 +1,5 @@
#ifndef __CONFIG_H
#define __CONFIG_H
#ifndef SOLVESPACE_CONFIG_H
#define SOLVESPACE_CONFIG_H
#define PACKAGE_VERSION "@solvespace_VERSION_MAJOR@.@solvespace_VERSION_MINOR@~@solvespace_GIT_HASH@"

View File

@ -4,8 +4,8 @@
//
// Copyright 2008-2013 Jonathan Westhues.
//-----------------------------------------------------------------------------
#ifndef __DSC_H
#define __DSC_H
#ifndef SOLVESPACE_DSC_H
#define SOLVESPACE_DSC_H
#include "solvespace.h"
@ -308,7 +308,7 @@ public:
if(n >= elemsAllocated) {
ReserveMore((elemsAllocated + 32)*2 - n);
}
int first = 0, last = n;
// We know that we must insert within the closed interval [first,last]
while(first != last) {

View File

@ -4,8 +4,8 @@
//
// Copyright 2008-2013 Jonathan Westhues.
//-----------------------------------------------------------------------------
#ifndef __EXPR_H
#define __EXPR_H
#ifndef SOLVESPACE_EXPR_H
#define SOLVESPACE_EXPR_H
class Expr {
public:

View File

@ -5,8 +5,8 @@
// Copyright 2008-2013 Jonathan Westhues.
//-----------------------------------------------------------------------------
#ifndef __POLYGON_H
#define __POLYGON_H
#ifndef SOLVESPACE_POLYGON_H
#define SOLVESPACE_POLYGON_H
class SPointList;
class SPolygon;

View File

@ -5,8 +5,8 @@
// Copyright 2008-2013 Jonathan Westhues.
//-----------------------------------------------------------------------------
#ifndef __SKETCH_H
#define __SKETCH_H
#ifndef SOLVESPACE_SKETCH_H
#define SOLVESPACE_SKETCH_H
class hGroup;
class hRequest;

View File

@ -4,32 +4,31 @@
// Copyright 2008-2013 Jonathan Westhues.
//-----------------------------------------------------------------------------
#ifndef __SOLVESPACE_H
#define __SOLVESPACE_H
#ifndef SOLVESPACE_H
#define SOLVESPACE_H
#include <stdint.h>
#include <stdlib.h>
#include <ctype.h>
#include <string.h>
#include <stdio.h>
#include <stddef.h>
#include <stdarg.h>
#include <setjmp.h>
#include <limits.h>
#include <math.h>
#include <setjmp.h>
#include <limits.h>
#include <stdarg.h>
#include <stddef.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <algorithm>
#include <chrono>
#include <functional>
#include <memory>
#include <string>
#include <locale>
#include <vector>
#include <map>
#include <memory>
#include <set>
#include <sstream>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <map>
#include <set>
#include <chrono>
#include <sstream>
#include <vector>
// We declare these in advance instead of simply using FT_Library
// (defined as typedef FT_LibraryRec_* FT_Library) because including

View File

@ -7,8 +7,8 @@
// Copyright 2008-2013 Jonathan Westhues.
//-----------------------------------------------------------------------------
#ifndef __SURFACE_H
#define __SURFACE_H
#ifndef SOLVESPACE_SURFACE_H
#define SOLVESPACE_SURFACE_H
// Utility functions, Bernstein polynomials of order 1-3 and their derivatives.
double Bernstein(int k, int deg, double t);

View File

@ -6,8 +6,8 @@
// Copyright 2016 whitequark, Peter Barfuss.
//-----------------------------------------------------------------------------
#ifndef __TTF_H
#define __TTF_H
#ifndef SOLVESPACE_TTF_H
#define SOLVESPACE_TTF_H
class TtfFont {
public:

View File

@ -5,8 +5,8 @@
// Copyright 2008-2013 Jonathan Westhues.
//-----------------------------------------------------------------------------
#ifndef __UI_H
#define __UI_H
#ifndef SOLVESPACE_UI_H
#define SOLVESPACE_UI_H
class Locale {
public: