From dc2c9f06d086dcd8b2d28399f91c0b870b6347fa Mon Sep 17 00:00:00 2001 From: Nicolay Korslund Date: Thu, 3 Jun 2010 20:44:55 +0200 Subject: [PATCH] Renamed all .h to .hpp. Started porting rendering code. --- CMakeLists.txt | 2 +- bsa/bsa_archive.cpp | 13 ++++--- bsa/{bsa_archive.h => bsa_archive.hpp} | 17 ++------- bsa/bsa_file.cpp | 8 ++--- bsa/{bsa_file.h => bsa_file.hpp} | 2 +- bsa/tests/bsa_file_test.cpp | 2 +- bsa/tests/bsatool.cpp | 4 +-- bsa/tests/ogre_archive_test.cpp | 2 +- esm/esm_reader.hpp | 8 ++--- game/cell_store.cpp | 2 +- game/cell_store.hpp | 2 +- game/main.cpp | 30 ++++++++++++++-- game/render/cell.hpp | 18 ++++++++++ game/setup.cpp | 36 ------------------- mangle | 2 +- nif/{controlled.h => controlled.hpp} | 2 +- nif/{controller.h => controller.hpp} | 6 ++-- nif/{data.h => data.hpp} | 2 +- nif/{effect.h => effect.hpp} | 2 +- nif/{extra.h => extra.hpp} | 6 ++-- nif/nif_file.cpp | 22 ++++++------ nif/{nif_file.h => nif_file.hpp} | 12 +++---- nif/{nif_types.h => nif_types.hpp} | 0 nif/{node.h => node.hpp} | 4 +-- nif/{property.h => property.hpp} | 2 +- nif/{record.h => record.hpp} | 0 nif/{record_ptr.h => record_ptr.hpp} | 2 +- nif/tests/Makefile | 2 +- nif/tests/nif_bsa_test.cpp | 6 ++-- nif/tests/niftool.cpp | 10 +++--- nifogre/ogre_nif_loader.cpp | 12 +++---- ...{ogre_nif_loader.h => ogre_nif_loader.hpp} | 0 nifogre/tests/ogre_nif_test.cpp | 4 +-- ogre/.gitignore | 1 + ogre/renderer.cpp | 34 ++++++++++++++++++ ogre/renderer.hpp | 34 ++++++++++++++++++ tools/{slice_array.h => slice_array.hpp} | 0 tools/stringops.cpp | 2 +- tools/{stringops.h => stringops.hpp} | 0 tools/tests/Makefile | 4 +-- tools/tests/slice_test.cpp | 2 +- tools/tests/strops_test.cpp | 2 +- 42 files changed, 192 insertions(+), 129 deletions(-) rename bsa/{bsa_archive.h => bsa_archive.hpp} (65%) rename bsa/{bsa_file.h => bsa_file.hpp} (98%) create mode 100644 game/render/cell.hpp delete mode 100644 game/setup.cpp rename nif/{controlled.h => controlled.hpp} (99%) rename nif/{controller.h => controller.hpp} (97%) rename nif/{data.h => data.hpp} (99%) rename nif/{effect.h => effect.hpp} (98%) rename nif/{extra.h => extra.hpp} (96%) rename nif/{nif_file.h => nif_file.hpp} (94%) rename nif/{nif_types.h => nif_types.hpp} (100%) rename nif/{node.h => node.hpp} (98%) rename nif/{property.h => property.hpp} (99%) rename nif/{record.h => record.hpp} (100%) rename nif/{record_ptr.h => record_ptr.hpp} (99%) rename nifogre/{ogre_nif_loader.h => ogre_nif_loader.hpp} (100%) create mode 100644 ogre/.gitignore create mode 100644 ogre/renderer.cpp create mode 100644 ogre/renderer.hpp rename tools/{slice_array.h => slice_array.hpp} (100%) rename tools/{stringops.h => stringops.hpp} (100%) diff --git a/CMakeLists.txt b/CMakeLists.txt index ff461fc43..77d18f210 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -11,7 +11,7 @@ set(BSA bsa/bsa_archive.cpp bsa/bsa_file.cpp) set(NIF nif/nif_file.cpp nifogre/ogre_nif_loader.cpp) set(TOOLS tools/stringops.cpp) set(MANGLE_VFS mangle/vfs/servers/ogre_vfs.cpp) -set(GAME game/main.cpp game/esm_store/store.cpp game/cell_store.cpp game/setup.cpp) +set(GAME game/main.cpp game/esm_store/store.cpp game/cell_store.cpp) # Platform specific if (WIN32) diff --git a/bsa/bsa_archive.cpp b/bsa/bsa_archive.cpp index 304dfd57a..3b34c4c02 100644 --- a/bsa/bsa_archive.cpp +++ b/bsa/bsa_archive.cpp @@ -21,13 +21,13 @@ */ -#include "bsa_archive.h" +#include "bsa_archive.hpp" #include #include #include -#include "bsa_file.h" -#include "../mangle/stream/clients/ogre_datastream.h" +#include "bsa_file.hpp" +#include "../mangle/stream/clients/ogre_datastream.hpp" using namespace Ogre; using namespace Mangle::Stream; @@ -152,10 +152,7 @@ public: }; static bool init = false; - -// The functions below are the only publicly exposed part of this file - -void insertBSAFactory() +static void insertBSAFactory() { if(!init) { @@ -164,6 +161,8 @@ void insertBSAFactory() } } +// The function below is the only publicly exposed part of this file + void addBSA(const char* name, const char* group) { insertBSAFactory(); diff --git a/bsa/bsa_archive.h b/bsa/bsa_archive.hpp similarity index 65% rename from bsa/bsa_archive.h rename to bsa/bsa_archive.hpp index a85508d54..007fd5b36 100644 --- a/bsa/bsa_archive.h +++ b/bsa/bsa_archive.hpp @@ -24,21 +24,8 @@ #ifndef _BSA_ARCHIVE_H_ #define _BSA_ARCHIVE_H_ -/** Insert the archive manager for .bsa files into the OGRE resource - loading system. You only need to call this function once. - - After calling it, you can do: - - ResourceGroupManager::getSingleton(). - addResourceLocation("Morrowind.bsa", "BSA", "General"); - - or add BSA files to resources.cfg, etc. You can also use the - shortcut addBSA() below, which will call insertBSAFactory() for - you. -*/ -void insertBSAFactory(); - -/// Add the given BSA file to the Ogre resource system. +/// Add the given BSA file as an input archive in the Ogre resource +/// system. void addBSA(const char* file, const char* group="General"); #endif diff --git a/bsa/bsa_file.cpp b/bsa/bsa_file.cpp index ac0f09598..dfe35ea93 100644 --- a/bsa/bsa_file.cpp +++ b/bsa/bsa_file.cpp @@ -21,11 +21,11 @@ */ -#include "bsa_file.h" +#include "bsa_file.hpp" -#include "../mangle/stream/servers/file_stream.h" -#include "../mangle/stream/filters/slice_stream.h" -#include "../mangle/tools/str_exception.h" +#include "../mangle/stream/servers/file_stream.hpp" +#include "../mangle/stream/filters/slice_stream.hpp" +#include "../mangle/tools/str_exception.hpp" #include #include diff --git a/bsa/bsa_file.h b/bsa/bsa_file.hpp similarity index 98% rename from bsa/bsa_file.h rename to bsa/bsa_file.hpp index 3b6cbcd2b..f4ef7676c 100644 --- a/bsa/bsa_file.h +++ b/bsa/bsa_file.hpp @@ -24,7 +24,7 @@ #ifndef _BSA_FILE_H_ #define _BSA_FILE_H_ -#include "../mangle/stream/stream.h" +#include "../mangle/stream/stream.hpp" #include #include diff --git a/bsa/tests/bsa_file_test.cpp b/bsa/tests/bsa_file_test.cpp index e30a79916..ea3f9291c 100644 --- a/bsa/tests/bsa_file_test.cpp +++ b/bsa/tests/bsa_file_test.cpp @@ -1,4 +1,4 @@ -#include "../bsa_file.h" +#include "../bsa_file.hpp" /* Test of the BSAFile class diff --git a/bsa/tests/bsatool.cpp b/bsa/tests/bsatool.cpp index a804c58fe..da96c2ed5 100644 --- a/bsa/tests/bsatool.cpp +++ b/bsa/tests/bsatool.cpp @@ -1,4 +1,4 @@ -#include "../bsa_file.h" +#include "../bsa_file.hpp" #include "bsatool_cmd.h" @@ -7,7 +7,7 @@ #include #include -#include "../../mangle/stream/filters/buffer_stream.h" +#include "../../mangle/stream/filters/buffer_stream.hpp" using namespace std; using namespace Mangle::Stream; diff --git a/bsa/tests/ogre_archive_test.cpp b/bsa/tests/ogre_archive_test.cpp index a5b3b7524..1a4334e60 100644 --- a/bsa/tests/ogre_archive_test.cpp +++ b/bsa/tests/ogre_archive_test.cpp @@ -3,7 +3,7 @@ // This is a test of the BSA archive handler for OGRE. -#include "../bsa_archive.h" +#include "../bsa_archive.hpp" using namespace Ogre; using namespace std; diff --git a/esm/esm_reader.hpp b/esm/esm_reader.hpp index 0d895582d..2b0b17195 100644 --- a/esm/esm_reader.hpp +++ b/esm/esm_reader.hpp @@ -9,10 +9,10 @@ #include #include -#include "../mangle/stream/stream.h" -#include "../mangle/stream/servers/file_stream.h" -#include "../mangle/tools/str_exception.h" -#include "../tools/stringops.h" +#include "../mangle/stream/stream.hpp" +#include "../mangle/stream/servers/file_stream.hpp" +#include "../mangle/tools/str_exception.hpp" +#include "../tools/stringops.hpp" namespace ESM { diff --git a/game/cell_store.cpp b/game/cell_store.cpp index d07007ad2..4383f932f 100644 --- a/game/cell_store.cpp +++ b/game/cell_store.cpp @@ -1,6 +1,6 @@ #include "cell_store.hpp" #include -#include "mangle/tools/str_exception.h" +#include "mangle/tools/str_exception.hpp" using namespace ESMS; using namespace std; diff --git a/game/cell_store.hpp b/game/cell_store.hpp index 56fe0fb37..40580de49 100644 --- a/game/cell_store.hpp +++ b/game/cell_store.hpp @@ -12,7 +12,7 @@ #include "esm_store/store.hpp" #include "esm/records.hpp" -#include "mangle/tools/str_exception.h" +#include "mangle/tools/str_exception.hpp" #include namespace ESMS diff --git a/game/main.cpp b/game/main.cpp index 1d7ec097b..5ee258664 100644 --- a/game/main.cpp +++ b/game/main.cpp @@ -1,11 +1,36 @@ #include #include "cell_store.hpp" +#include "render/cell.hpp" +#include "bsa/bsa_archive.hpp" +#include using namespace std; -// See setup.cpp -void main_setup(const char* bsaFile); +// Absolute minimal OGRE setup +void ogre_setup() +{ + using namespace Ogre; + + // Disable Ogre logging + new LogManager; + Log *log = LogManager::getSingleton().createLog(""); + log->setDebugOutputEnabled(false); + + // Set up Root. + new Root(); +} + +void main_setup(const char* bsaFile) +{ + cout << "Hello, fellow traveler!\n"; + + cout << "Initializing OGRE\n"; + ogre_setup(); + + cout << "Adding " << bsaFile << endl; + addBSA(bsaFile); +} void maintest() { @@ -18,6 +43,7 @@ void maintest() ESM::ESMReader esm; ESMS::ESMStore store; ESMS::CellStore cell; + Render::CellRender rend(cell); esm.open(esmFile); store.load(esm); diff --git a/game/render/cell.hpp b/game/render/cell.hpp new file mode 100644 index 000000000..a1022a1a5 --- /dev/null +++ b/game/render/cell.hpp @@ -0,0 +1,18 @@ +#ifndef _GAME_RENDER_CELL_H +#define _GAME_RENDER_CELL_H + +#include "../cell_store.hpp" + +namespace Render +{ + class CellRender + { + const ESMS::CellStore *cell; + + public: + CellRender(const ESMS::CellStore &_cell) + : cell(&_cell) {} + }; +} + +#endif diff --git a/game/setup.cpp b/game/setup.cpp deleted file mode 100644 index 448afa138..000000000 --- a/game/setup.cpp +++ /dev/null @@ -1,36 +0,0 @@ -/* Split off into a separate file just to increase compile - speed. Parsing Ogre.h takes a long time, and the Ogre-dependent - part doesn't change much. This entire layout will change later. - */ - -#include -#include "bsa/bsa_archive.h" -#include "Ogre.h" - -using namespace std; - -// Absolute minimal OGRE setup -void ogre_setup() -{ - using namespace Ogre; - - // Disable Ogre logging - new LogManager; - Log *log = LogManager::getSingleton().createLog(""); - log->setDebugOutputEnabled(false); - - // Set up Root. - new Root(); -} - -void main_setup(const char* bsaFile) -{ - cout << "Hello, fellow traveler!\n"; - - cout << "Initializing OGRE\n"; - ogre_setup(); - - cout << "Adding " << bsaFile << endl; - addBSA(bsaFile); -} - diff --git a/mangle b/mangle index 52e7570b4..6b0b7c95f 160000 --- a/mangle +++ b/mangle @@ -1 +1 @@ -Subproject commit 52e7570b4fddd868cc0483e0fa2e49c50d5a1334 +Subproject commit 6b0b7c95f8a40a53b4c26d551d4fb5118deb7e12 diff --git a/nif/controlled.h b/nif/controlled.hpp similarity index 99% rename from nif/controlled.h rename to nif/controlled.hpp index 763461e6a..8396a0a7b 100644 --- a/nif/controlled.h +++ b/nif/controlled.hpp @@ -24,7 +24,7 @@ #ifndef _NIF_CONTROLLED_H_ #define _NIF_CONTROLLED_H_ -#include "extra.h" +#include "extra.hpp" namespace Nif { diff --git a/nif/controller.h b/nif/controller.hpp similarity index 97% rename from nif/controller.h rename to nif/controller.hpp index 548c8feb2..49a38cfaa 100644 --- a/nif/controller.h +++ b/nif/controller.hpp @@ -24,9 +24,9 @@ #ifndef _NIF_CONTROLLER_H_ #define _NIF_CONTROLLER_H_ -#include "record.h" -#include "nif_file.h" -#include "record_ptr.h" +#include "record.hpp" +#include "nif_file.hpp" +#include "record_ptr.hpp" namespace Nif { diff --git a/nif/data.h b/nif/data.hpp similarity index 99% rename from nif/data.h rename to nif/data.hpp index a3800f75d..d7d233dff 100644 --- a/nif/data.h +++ b/nif/data.hpp @@ -24,7 +24,7 @@ #ifndef _NIF_DATA_H_ #define _NIF_DATA_H_ -#include "controlled.h" +#include "controlled.hpp" namespace Nif { diff --git a/nif/effect.h b/nif/effect.hpp similarity index 98% rename from nif/effect.h rename to nif/effect.hpp index 2ce835bac..b0cc64228 100644 --- a/nif/effect.h +++ b/nif/effect.hpp @@ -24,7 +24,7 @@ #ifndef _NIF_EFFECT_H_ #define _NIF_EFFECT_H_ -#include "node.h" +#include "node.hpp" namespace Nif { diff --git a/nif/extra.h b/nif/extra.hpp similarity index 96% rename from nif/extra.h rename to nif/extra.hpp index a4208331c..64c512509 100644 --- a/nif/extra.h +++ b/nif/extra.hpp @@ -24,9 +24,9 @@ #ifndef _NIF_EXTRA_H_ #define _NIF_EXTRA_H_ -#include "record.h" -#include "nif_file.h" -#include "record_ptr.h" +#include "record.hpp" +#include "nif_file.hpp" +#include "record_ptr.hpp" namespace Nif { diff --git a/nif/nif_file.cpp b/nif/nif_file.cpp index 1e1598170..c09705b90 100644 --- a/nif/nif_file.cpp +++ b/nif/nif_file.cpp @@ -21,17 +21,17 @@ */ -#include "nif_file.h" -#include "record.h" -#include "../tools/stringops.h" - -#include "extra.h" -#include "controlled.h" -#include "node.h" -#include "property.h" -#include "data.h" -#include "effect.h" -#include "controller.h" +#include "nif_file.hpp" +#include "record.hpp" +#include "../tools/stringops.hpp" + +#include "extra.hpp" +#include "controlled.hpp" +#include "node.hpp" +#include "property.hpp" +#include "data.hpp" +#include "effect.hpp" +#include "controller.hpp" #include using namespace std; diff --git a/nif/nif_file.h b/nif/nif_file.hpp similarity index 94% rename from nif/nif_file.h rename to nif/nif_file.hpp index 23815c346..031bb9e33 100644 --- a/nif/nif_file.h +++ b/nif/nif_file.hpp @@ -24,18 +24,18 @@ #ifndef _NIF_FILE_H_ #define _NIF_FILE_H_ -#include "../mangle/stream/stream.h" -#include "../mangle/stream/filters/buffer_stream.h" -#include "../mangle/tools/str_exception.h" +#include "../mangle/stream/stream.hpp" +#include "../mangle/stream/filters/buffer_stream.hpp" +#include "../mangle/tools/str_exception.hpp" -#include "../tools/slice_array.h" +#include "../tools/slice_array.hpp" #include #include #include -#include "record.h" -#include "nif_types.h" +#include "record.hpp" +#include "nif_types.hpp" using namespace Mangle::Stream; diff --git a/nif/nif_types.h b/nif/nif_types.hpp similarity index 100% rename from nif/nif_types.h rename to nif/nif_types.hpp diff --git a/nif/node.h b/nif/node.hpp similarity index 98% rename from nif/node.h rename to nif/node.hpp index 5a4adea7f..381dd7c2d 100644 --- a/nif/node.h +++ b/nif/node.hpp @@ -24,8 +24,8 @@ #ifndef _NIF_NODE_H_ #define _NIF_NODE_H_ -#include "controlled.h" -#include "data.h" +#include "controlled.hpp" +#include "data.hpp" namespace Nif { diff --git a/nif/property.h b/nif/property.hpp similarity index 99% rename from nif/property.h rename to nif/property.hpp index 1ed11a0c9..c17bcfe62 100644 --- a/nif/property.h +++ b/nif/property.hpp @@ -24,7 +24,7 @@ #ifndef _NIF_PROPERTY_H_ #define _NIF_PROPERTY_H_ -#include "controlled.h" +#include "controlled.hpp" namespace Nif { diff --git a/nif/record.h b/nif/record.hpp similarity index 100% rename from nif/record.h rename to nif/record.hpp diff --git a/nif/record_ptr.h b/nif/record_ptr.hpp similarity index 99% rename from nif/record_ptr.h rename to nif/record_ptr.hpp index fabec2c82..3011aaa17 100644 --- a/nif/record_ptr.h +++ b/nif/record_ptr.hpp @@ -24,7 +24,7 @@ #ifndef _NIF_RECORD_PTR_H_ #define _NIF_RECORD_PTR_H_ -#include "nif_file.h" +#include "nif_file.hpp" #include namespace Nif diff --git a/nif/tests/Makefile b/nif/tests/Makefile index 07b7f7063..0754bdfa6 100644 --- a/nif/tests/Makefile +++ b/nif/tests/Makefile @@ -2,7 +2,7 @@ GCC=g++ all: niftool nif_bsa_test -niftool: niftool.cpp ../nif_file.h ../nif_file.cpp ../record.h +niftool: niftool.cpp ../nif_file.hpp ../nif_file.cpp ../record.hpp $(GCC) $< ../nif_file.cpp ../../tools/stringops.cpp -o $@ nif_bsa_test: nif_bsa_test.cpp ../nif_file.cpp ../../bsa/bsa_file.cpp ../../tools/stringops.cpp diff --git a/nif/tests/nif_bsa_test.cpp b/nif/tests/nif_bsa_test.cpp index f7d7907d1..c22aad680 100644 --- a/nif/tests/nif_bsa_test.cpp +++ b/nif/tests/nif_bsa_test.cpp @@ -2,9 +2,9 @@ Runs NIFFile through all the NIFs in Morrowind.bsa. */ -#include "../nif_file.h" -#include "../../bsa/bsa_file.h" -#include "../../tools/stringops.h" +#include "../nif_file.hpp" +#include "../../bsa/bsa_file.hpp" +#include "../../tools/stringops.hpp" #include using namespace Mangle::Stream; diff --git a/nif/tests/niftool.cpp b/nif/tests/niftool.cpp index 68575c303..b34084e12 100644 --- a/nif/tests/niftool.cpp +++ b/nif/tests/niftool.cpp @@ -2,13 +2,13 @@ Test of the NIFFile class */ -#include "../nif_file.h" +#include "../nif_file.hpp" #include #include -#include "../../mangle/stream/servers/file_stream.h" -#include "../node.h" -#include "../controller.h" -#include "../data.h" +#include "../../mangle/stream/servers/file_stream.hpp" +#include "../node.hpp" +#include "../controller.hpp" +#include "../data.hpp" using namespace Mangle::Stream; using namespace std; diff --git a/nifogre/ogre_nif_loader.cpp b/nifogre/ogre_nif_loader.cpp index 58a4162e5..1a2ef56b7 100644 --- a/nifogre/ogre_nif_loader.cpp +++ b/nifogre/ogre_nif_loader.cpp @@ -21,15 +21,15 @@ */ -#include "ogre_nif_loader.h" +#include "ogre_nif_loader.hpp" #include #include -#include "../mangle/vfs/servers/ogre_vfs.h" -#include "../nif/nif_file.h" -#include "../nif/node.h" -#include "../nif/data.h" -#include "../nif/property.h" +#include "../mangle/vfs/servers/ogre_vfs.hpp" +#include "../nif/nif_file.hpp" +#include "../nif/node.hpp" +#include "../nif/data.hpp" +#include "../nif/property.hpp" // For warning messages #include diff --git a/nifogre/ogre_nif_loader.h b/nifogre/ogre_nif_loader.hpp similarity index 100% rename from nifogre/ogre_nif_loader.h rename to nifogre/ogre_nif_loader.hpp diff --git a/nifogre/tests/ogre_nif_test.cpp b/nifogre/tests/ogre_nif_test.cpp index 379ba4220..89f99e8ff 100644 --- a/nifogre/tests/ogre_nif_test.cpp +++ b/nifogre/tests/ogre_nif_test.cpp @@ -1,5 +1,5 @@ -#include "../ogre_nif_loader.h" -#include "../../bsa/bsa_archive.h" +#include "../ogre_nif_loader.hpp" +#include "../../bsa/bsa_archive.hpp" //#define SCREENSHOT diff --git a/ogre/.gitignore b/ogre/.gitignore new file mode 100644 index 000000000..3367afdbb --- /dev/null +++ b/ogre/.gitignore @@ -0,0 +1 @@ +old diff --git a/ogre/renderer.cpp b/ogre/renderer.cpp new file mode 100644 index 000000000..b231c46eb --- /dev/null +++ b/ogre/renderer.cpp @@ -0,0 +1,34 @@ +#include "render.hpp" + +using namespace Ogre; + +bool OgreRenderer::configure(bool showConfig, + const std::string &pluginCfg, + bool _logging); +{ + // Set up logging first + new LogManager; + Log *log = LogManager::getSingleton().createLog("Ogre.log"); + logging = _logging; + + if(logging) + // Full log detail + log->setLogDetail(LL_BOREME); + else + // Disable logging + log->setDebugOutputEnabled(false); + + mRoot = new Root(plugincfg, "ogre.cfg", ""); + + // Show the configuration dialog and initialise the system, if the + // showConfig parameter is specified. The settings are stored in + // ogre.cfg. If showConfig is false, the settings are assumed to + // already exist in ogre.cfg. + int result; + if(showConfig) + result = mRoot->showConfigDialog(); + else + result = mRoot->restoreConfig(); + + return !result; +} diff --git a/ogre/renderer.hpp b/ogre/renderer.hpp new file mode 100644 index 000000000..ab1654107 --- /dev/null +++ b/ogre/renderer.hpp @@ -0,0 +1,34 @@ +#ifndef _OGRE_RENDERER_H +#define _OGRE_RENDERER_H + +/* + Ogre renderer class + */ + +#include +#include + +namespace Render +{ + class OgreRenderer + { + Ogre::Root *mRoot; + bool logging; + + public: + OgreRenderer() + : mRoot(NULL) {} + + /** Configure the renderer. This will load configuration files and + set up the Root and logging classes. */ + + bool configure(bool showConfig, // Show config dialog box? + const std::string &pluginCfg, // plugin.cfg file + bool _logging); // Enable or disable logging + + /// Kill the renderer. + void cleanup(); + }; +} + +#endif diff --git a/tools/slice_array.h b/tools/slice_array.hpp similarity index 100% rename from tools/slice_array.h rename to tools/slice_array.hpp diff --git a/tools/stringops.cpp b/tools/stringops.cpp index fcb1aff27..1b1ee0c57 100644 --- a/tools/stringops.cpp +++ b/tools/stringops.cpp @@ -1,4 +1,4 @@ -#include "stringops.h" +#include "stringops.hpp" #include #include diff --git a/tools/stringops.h b/tools/stringops.hpp similarity index 100% rename from tools/stringops.h rename to tools/stringops.hpp diff --git a/tools/tests/Makefile b/tools/tests/Makefile index 8791154bf..dc1ded5ff 100644 --- a/tools/tests/Makefile +++ b/tools/tests/Makefile @@ -2,10 +2,10 @@ GCC=g++ all: strops_test slice_test -slice_test: slice_test.cpp ../slice_array.h +slice_test: slice_test.cpp ../slice_array.hpp $(GCC) $< -o $@ -strops_test: strops_test.cpp ../stringops.h ../stringops.cpp +strops_test: strops_test.cpp ../stringops.hpp ../stringops.cpp $(GCC) $< -o $@ ../stringops.cpp clean: diff --git a/tools/tests/slice_test.cpp b/tools/tests/slice_test.cpp index ff60d2c96..950194279 100644 --- a/tools/tests/slice_test.cpp +++ b/tools/tests/slice_test.cpp @@ -4,7 +4,7 @@ using namespace std; #include -#include "../slice_array.h" +#include "../slice_array.hpp" int main() { diff --git a/tools/tests/strops_test.cpp b/tools/tests/strops_test.cpp index 6c4b3e802..ca5bd55a9 100644 --- a/tools/tests/strops_test.cpp +++ b/tools/tests/strops_test.cpp @@ -1,6 +1,6 @@ #include -#include "../stringops.h" +#include "../stringops.hpp" int main() {