Skip to content

Commit

Permalink
Rewrite include definitions
Browse files Browse the repository at this point in the history
Remove relative includes, replace with paths rooted at the project
component root directory, even for headers in the same directory.
Use quoted includes for project components,
use angled includes for external headers.

This style follows the Google style guide and simplifies the automatic
sorting and grouping of includes.
  • Loading branch information
sodevel committed Mar 16, 2022
1 parent a027912 commit 8c56e08
Show file tree
Hide file tree
Showing 77 changed files with 253 additions and 254 deletions.
2 changes: 1 addition & 1 deletion sdk/plugin_interface/component.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
#include <vector>
#include <utility>

#include "wx/wx.h"
#include <wx/wx.h>
#include "fontcontainer.h"

#define COMPONENT_TYPE_ABSTRACT 0
Expand Down
2 changes: 1 addition & 1 deletion sdk/plugin_interface/xrcconv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
///////////////////////////////////////////////////////////////////////////////

#include "xrcconv.h"
#include "wx/tokenzr.h"
#include <wx/tokenzr.h>

#include <set>

Expand Down
6 changes: 3 additions & 3 deletions src/codegen/codegen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@

#include "codegen.h"

#include "../model/objectbase.h"
#include "../rad/appdata.h"
#include "../utils/wxfbexception.h"
#include "model/objectbase.h"
#include "rad/appdata.h"
#include "utils/wxfbexception.h"

#include <wx/tokenzr.h>

Expand Down
4 changes: 2 additions & 2 deletions src/codegen/codegen.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@
#ifndef __CODEGEN__
#define __CODEGEN__

#include "../model/types.h"
#include "../utils/wxfbdefs.h"
#include "model/types.h"
#include "utils/wxfbdefs.h"

#include <map>
#include <vector>
Expand Down
2 changes: 1 addition & 1 deletion src/codegen/codeparser.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#pragma once

#include "../utils/debug.h"
#include "utils/debug.h"

#include <unordered_map>
#include <wx/textfile.h>
Expand Down
4 changes: 2 additions & 2 deletions src/codegen/codewriter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@

#include "codewriter.h"

#include "../utils/typeconv.h"
#include "../utils/wxfbexception.h"
#include "utils/typeconv.h"
#include "utils/wxfbexception.h"

#include <md5/md5.hh>

Expand Down
16 changes: 8 additions & 8 deletions src/codegen/cppcg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@

#include "cppcg.h"

#include "../model/objectbase.h"
#include "../rad/appdata.h"
#include "../rad/revision.h"
#include "../rad/version.h"
#include "../utils/filetocarray.h"
#include "../utils/typeconv.h"
#include "../utils/wxfbexception.h"
#include "codewriter.h"
#include "model/objectbase.h"
#include "rad/appdata.h"
#include "rad/revision.h"
#include "rad/version.h"
#include "utils/filetocarray.h"
#include "utils/typeconv.h"
#include "utils/wxfbexception.h"
#include "codegen/codewriter.h"

#include <algorithm>

Expand Down
4 changes: 2 additions & 2 deletions src/codegen/cppcg.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ The value of all properties that are file or a directory paths must be absolute,
#ifndef _CPP_CODE_GEN_
#define _CPP_CODE_GEN_

#include "codegen.h"
#include "codeparser.h"
#include "codegen/codegen.h"
#include "codegen/codeparser.h"

#include <set>
#include <vector>
Expand Down
16 changes: 8 additions & 8 deletions src/codegen/luacg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,14 @@

#include "luacg.h"

#include "../model/objectbase.h"
#include "../rad/appdata.h"
#include "../rad/revision.h"
#include "../rad/version.h"
#include "../utils/debug.h"
#include "../utils/typeconv.h"
#include "../utils/wxfbexception.h"
#include "codewriter.h"
#include "model/objectbase.h"
#include "rad/appdata.h"
#include "rad/revision.h"
#include "rad/version.h"
#include "utils/debug.h"
#include "utils/typeconv.h"
#include "utils/wxfbexception.h"
#include "codegen/codewriter.h"

#include <algorithm>

Expand Down
2 changes: 1 addition & 1 deletion src/codegen/luacg.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ none
#define fbfSILENT true
#define fbfMESSAGE false

#include "codegen.h"
#include "codegen/codegen.h"

#include <map>
#include <set>
Expand Down
16 changes: 8 additions & 8 deletions src/codegen/phpcg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,14 @@

#include "phpcg.h"

#include "codewriter.h"
#include "../utils/typeconv.h"
#include "../utils/debug.h"
#include "../rad/appdata.h"
#include "../rad/revision.h"
#include "../rad/version.h"
#include "../model/objectbase.h"
#include "../utils/wxfbexception.h"
#include "codegen/codewriter.h"
#include "utils/typeconv.h"
#include "utils/debug.h"
#include "rad/appdata.h"
#include "rad/revision.h"
#include "rad/version.h"
#include "model/objectbase.h"
#include "utils/wxfbexception.h"

#include <algorithm>

Expand Down
2 changes: 1 addition & 1 deletion src/codegen/phpcg.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ The value of all properties that are file or a directory paths must be absolute,
#define fbfSILENT true
#define fbfMESSAGE false

#include "codegen.h"
#include "codegen/codegen.h"

#include <set>
#include <vector>
Expand Down
16 changes: 8 additions & 8 deletions src/codegen/pythoncg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,14 @@

#include "pythoncg.h"

#include "../model/objectbase.h"
#include "../rad/appdata.h"
#include "../rad/revision.h"
#include "../rad/version.h"
#include "../utils/debug.h"
#include "../utils/typeconv.h"
#include "../utils/wxfbexception.h"
#include "codewriter.h"
#include "model/objectbase.h"
#include "rad/appdata.h"
#include "rad/revision.h"
#include "rad/version.h"
#include "utils/debug.h"
#include "utils/typeconv.h"
#include "utils/wxfbexception.h"
#include "codegen/codewriter.h"

#include <algorithm>

Expand Down
2 changes: 1 addition & 1 deletion src/codegen/pythoncg.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ The value of all properties that are file or a directory paths must be absolute,
#define fbfSILENT true
#define fbfMESSAGE false

#include "codegen.h"
#include "codegen/codegen.h"

#include <map>
#include <set>
Expand Down
6 changes: 3 additions & 3 deletions src/codegen/xrccg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@

#include "xrccg.h"

#include "../model/objectbase.h"
#include "../utils/typeconv.h"
#include "codewriter.h"
#include "model/objectbase.h"
#include "utils/typeconv.h"
#include "codegen/codewriter.h"

#include <ticpp.h>

Expand Down
2 changes: 1 addition & 1 deletion src/codegen/xrccg.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
#ifndef _XRC_CODE_GEN_
#define _XRC_CODE_GEN_

#include "codegen.h"
#include "codegen/codegen.h"

namespace ticpp
{
Expand Down
14 changes: 7 additions & 7 deletions src/model/database.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@

#include "database.h"

#include "../rad/bitmaps.h"
#include "../rad/wxfbmanager.h"
#include "../utils/debug.h"
#include "../utils/stringutils.h"
#include "../utils/typeconv.h"
#include "../utils/wxfbexception.h"
#include "objectbase.h"
#include "rad/bitmaps.h"
#include "rad/wxfbmanager.h"
#include "utils/debug.h"
#include "utils/stringutils.h"
#include "utils/typeconv.h"
#include "utils/wxfbexception.h"
#include "model/objectbase.h"

#include <ticpp.h>
#include <wx/dir.h>
Expand Down
4 changes: 2 additions & 2 deletions src/model/database.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
#ifndef __OBJ_DATABASE__
#define __OBJ_DATABASE__

#include "../utils/wxfbdefs.h"
#include "types.h"
#include "utils/wxfbdefs.h"
#include "model/types.h"

#include <set>
#include <functional>
Expand Down
8 changes: 4 additions & 4 deletions src/model/objectbase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@

#include "objectbase.h"

#include "../rad/appdata.h"
#include "../utils/debug.h"
#include "../utils/stringutils.h"
#include "../utils/typeconv.h"
#include "rad/appdata.h"
#include "utils/debug.h"
#include "utils/stringutils.h"
#include "utils/typeconv.h"

#include <ticpp.h>
#include <wx/tokenzr.h>
Expand Down
4 changes: 2 additions & 2 deletions src/model/objectbase.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@
#ifndef __OBJ__
#define __OBJ__

#include "../utils/wxfbdefs.h"
#include "types.h"
#include "utils/wxfbdefs.h"
#include "model/types.h"

#include <component.h>
#include <list>
Expand Down
2 changes: 1 addition & 1 deletion src/model/types.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

#include "types.h"

#include "../utils/stringutils.h"
#include "utils/stringutils.h"

#include <wx/tokenzr.h>

Expand Down
6 changes: 3 additions & 3 deletions src/model/xrcfilter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@

#include "xrcfilter.h"

#include "../utils/debug.h"
#include "../utils/typeconv.h"
#include "objectbase.h"
#include "utils/debug.h"
#include "utils/typeconv.h"
#include "model/objectbase.h"

PObjectBase XrcLoader::GetProject( ticpp::Document* xrcDoc )
{
Expand Down
2 changes: 1 addition & 1 deletion src/model/xrcfilter.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
#ifndef __XRC_FILTER__
#define __XRC_FILTER__

#include "database.h"
#include "model/database.h"

#include <ticpp.h>

Expand Down
2 changes: 1 addition & 1 deletion src/rad/about.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

#include "about.h"

#include "appdata.h"
#include "rad/appdata.h"

#include <wx/html/htmlwin.h>
#include <wx/mimetype.h>
Expand Down
32 changes: 16 additions & 16 deletions src/rad/appdata.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,22 +25,22 @@

#include "appdata.h"

#include "bitmaps.h"
#include "wxfbevent.h"
#include "wxfbmanager.h"

#include "../codegen/codewriter.h"
#include "../codegen/cppcg.h"
#include "../codegen/luacg.h"
#include "../codegen/phpcg.h"
#include "../codegen/pythoncg.h"
#include "../model/objectbase.h"
#include "../utils/stringutils.h"
#include "../utils/typeconv.h"
#include "../utils/wxfbexception.h"
#include "../utils/wxfbipc.h"
#include "dataobject/dataobject.h"
#include "xrcpreview/xrcpreview.h"
#include "rad/bitmaps.h"
#include "rad/wxfbevent.h"
#include "rad/wxfbmanager.h"

#include "codegen/codewriter.h"
#include "codegen/cppcg.h"
#include "codegen/luacg.h"
#include "codegen/phpcg.h"
#include "codegen/pythoncg.h"
#include "model/objectbase.h"
#include "utils/stringutils.h"
#include "utils/typeconv.h"
#include "utils/wxfbexception.h"
#include "utils/wxfbipc.h"
#include "rad/dataobject/dataobject.h"
#include "rad/xrcpreview/xrcpreview.h"

#include <ticpp.h>

Expand Down
4 changes: 2 additions & 2 deletions src/rad/appdata.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
#ifndef __APP_DATA__
#define __APP_DATA__

#include "../model/database.h"
#include "cmdproc.h"
#include "model/database.h"
#include "rad/cmdproc.h"

namespace ticpp
{
Expand Down
6 changes: 3 additions & 3 deletions src/rad/bitmaps.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@

#include "bitmaps.h"

#include "../utils/stringutils.h"
#include "../utils/typeconv.h"
#include "../utils/wxfbexception.h"
#include "utils/stringutils.h"
#include "utils/typeconv.h"
#include "utils/wxfbexception.h"

#include <default.xpm>
#include <ticpp.h>
Expand Down
Loading

0 comments on commit 8c56e08

Please sign in to comment.