From 15966d5cf0602580ae43d70fff417c2e77748fbb Mon Sep 17 00:00:00 2001 From: Parrot User Date: Sun, 17 Oct 2021 14:16:54 +0100 Subject: [PATCH 1/2] Adding library name (CXXGRAPH) in header guards to avoid possible conflicts in include folders Node and Graph --- include/Graph/Graph.hpp | 6 +++--- include/Graph/Graph_TS.hpp | 6 +++--- include/Node/Node.hpp | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/include/Graph/Graph.hpp b/include/Graph/Graph.hpp index a8245ad81..c4539a4b7 100644 --- a/include/Graph/Graph.hpp +++ b/include/Graph/Graph.hpp @@ -17,8 +17,8 @@ /*** License: AGPL v3.0 ***/ /***********************************************************/ -#ifndef __GRAPH_H__ -#define __GRAPH_H__ +#ifndef __CXXGRAPH_GRAPH_H__ +#define __CXXGRAPH_GRAPH_H__ #pragma once @@ -1978,4 +1978,4 @@ namespace CXXGRAPH } } // namespace CXXGRAPH -#endif // __GRAPH_H__ \ No newline at end of file +#endif // __CXXGRAPH_GRAPH_H__ \ No newline at end of file diff --git a/include/Graph/Graph_TS.hpp b/include/Graph/Graph_TS.hpp index 137b93b6b..3ca13d37f 100644 --- a/include/Graph/Graph_TS.hpp +++ b/include/Graph/Graph_TS.hpp @@ -17,8 +17,8 @@ /*** License: AGPL v3.0 ***/ /***********************************************************/ -#ifndef __GRAPH_TS_H__ -#define __GRAPH_TS_H__ +#ifndef __CXXGRAPH_GRAPH_TS_H__ +#define __CXXGRAPH_GRAPH_TS_H__ #pragma once @@ -429,4 +429,4 @@ namespace CXXGRAPH return partitions; } } -#endif // __GRAPH_TS_H__ +#endif // __CXXGRAPH_GRAPH_TS_H__ diff --git a/include/Node/Node.hpp b/include/Node/Node.hpp index 2548b752f..ddcdc7abf 100644 --- a/include/Node/Node.hpp +++ b/include/Node/Node.hpp @@ -18,8 +18,8 @@ /***********************************************************/ -#ifndef __NODE_H__ -#define __NODE_H__ +#ifndef __CXXGRAPH_NODE_H__ +#define __CXXGRAPH_NODE_H__ #pragma once #include @@ -90,4 +90,4 @@ namespace CXXGRAPH } } -#endif // __NODE_H__ \ No newline at end of file +#endif // __CXXGRAPH_NODE_H__ \ No newline at end of file From da595c9cf8a06ea7feeec5b0b00f6f2a915806b8 Mon Sep 17 00:00:00 2001 From: AlfredCP Date: Sun, 17 Oct 2021 17:03:36 +0100 Subject: [PATCH 2/2] Adding library name (CXXGRAPH) in header guards to avoid possible conflicts in include folders Edge, Partitioning and Utility --- include/Edge/DirectedEdge.hpp | 6 +++--- include/Edge/DirectedWeightedEdge.hpp | 6 +++--- include/Edge/Edge.hpp | 6 +++--- include/Edge/UndirectedEdge.hpp | 6 +++--- include/Edge/UndirectedWeightedEdge.hpp | 6 +++--- include/Edge/Weighted.hpp | 6 +++--- include/Partitioning/Partition.hpp | 6 +++--- include/Partitioning/PartitioningStats.hpp | 6 +++--- include/Utility/ConstString.hpp | 6 +++--- include/Utility/ConstValue.hpp | 6 +++--- include/Utility/Reader.hpp | 6 +++--- include/Utility/ThreadSafe.hpp | 6 +++--- include/Utility/Writer.hpp | 6 +++--- 13 files changed, 39 insertions(+), 39 deletions(-) diff --git a/include/Edge/DirectedEdge.hpp b/include/Edge/DirectedEdge.hpp index 9d9695267..dbe2a0b65 100644 --- a/include/Edge/DirectedEdge.hpp +++ b/include/Edge/DirectedEdge.hpp @@ -17,8 +17,8 @@ /*** License: AGPL v3.0 ***/ /***********************************************************/ -#ifndef __DIRECTEDEDGE_H__ -#define __DIRECTEDEDGE_H__ +#ifndef __CXXGRAPH_DIRECTEDEDGE_H__ +#define __CXXGRAPH_DIRECTEDEDGE_H__ #pragma once @@ -101,4 +101,4 @@ namespace CXXGRAPH } } -#endif // __DIRECTEDEDGE_H__ \ No newline at end of file +#endif // __CXXGRAPH_DIRECTEDEDGE_H__ \ No newline at end of file diff --git a/include/Edge/DirectedWeightedEdge.hpp b/include/Edge/DirectedWeightedEdge.hpp index 937b17e23..4f2d9ff86 100644 --- a/include/Edge/DirectedWeightedEdge.hpp +++ b/include/Edge/DirectedWeightedEdge.hpp @@ -16,8 +16,8 @@ /***********************************************************/ /*** License: AGPL v3.0 ***/ /***********************************************************/ -#ifndef __DIRECTEDWEIGHTEDEDGE_H__ -#define __DIRECTEDWEIGHTEDEDGE_H__ +#ifndef __CXXGRAPH_DIRECTEDWEIGHTEDEDGE_H__ +#define __CXXGRAPH_DIRECTEDWEIGHTEDEDGE_H__ #pragma once @@ -106,4 +106,4 @@ namespace CXXGRAPH } -#endif // __DIRECTEDWEIGHTEDEDGE_H__ \ No newline at end of file +#endif // __CXXGRAPH_DIRECTEDWEIGHTEDEDGE_H__ \ No newline at end of file diff --git a/include/Edge/Edge.hpp b/include/Edge/Edge.hpp index 4bfca3a4b..a95b4d4a8 100644 --- a/include/Edge/Edge.hpp +++ b/include/Edge/Edge.hpp @@ -17,8 +17,8 @@ /*** License: AGPL v3.0 ***/ /***********************************************************/ -#ifndef __EDGE_H__ -#define __EDGE_H__ +#ifndef __CXXGRAPH_EDGE_H__ +#define __CXXGRAPH_EDGE_H__ #pragma once @@ -114,4 +114,4 @@ namespace CXXGRAPH } } -#endif // __EDGE_H__ \ No newline at end of file +#endif // __CXXGRAPH_EDGE_H__ \ No newline at end of file diff --git a/include/Edge/UndirectedEdge.hpp b/include/Edge/UndirectedEdge.hpp index 5e9996212..c09cf895f 100644 --- a/include/Edge/UndirectedEdge.hpp +++ b/include/Edge/UndirectedEdge.hpp @@ -17,8 +17,8 @@ /*** License: AGPL v3.0 ***/ /***********************************************************/ -#ifndef __UNDIRECTEDEDGE_H__ -#define __UNDIRECTEDEDGE_H__ +#ifndef __CXXGRAPH_UNDIRECTEDEDGE_H__ +#define __CXXGRAPH_UNDIRECTEDEDGE_H__ #pragma once @@ -100,4 +100,4 @@ namespace CXXGRAPH } -#endif // __UNDIRECTEDEDGE_H__ \ No newline at end of file +#endif // __CXXGRAPH_UNDIRECTEDEDGE_H__ \ No newline at end of file diff --git a/include/Edge/UndirectedWeightedEdge.hpp b/include/Edge/UndirectedWeightedEdge.hpp index 3c48f4d86..2141b02f5 100644 --- a/include/Edge/UndirectedWeightedEdge.hpp +++ b/include/Edge/UndirectedWeightedEdge.hpp @@ -17,8 +17,8 @@ /*** License: AGPL v3.0 ***/ /***********************************************************/ -#ifndef __UNDIRECTEDWEIGHTEDEDGE_H__ -#define __UNDIRECTEDWEIGHTEDEDGE_H__ +#ifndef __CXXGRAPH_UNDIRECTEDWEIGHTEDEDGE_H__ +#define __CXXGRAPH_UNDIRECTEDWEIGHTEDEDGE_H__ #pragma once @@ -107,4 +107,4 @@ namespace CXXGRAPH } -#endif // __UNDIRECTEDWEIGHTEDEDGE_H__ \ No newline at end of file +#endif // __CXXGRAPH_UNDIRECTEDWEIGHTEDEDGE_H__ \ No newline at end of file diff --git a/include/Edge/Weighted.hpp b/include/Edge/Weighted.hpp index a3d878a34..14e4e4fec 100644 --- a/include/Edge/Weighted.hpp +++ b/include/Edge/Weighted.hpp @@ -17,8 +17,8 @@ /*** License: AGPL v3.0 ***/ /***********************************************************/ -#ifndef __WEIGHTED_H__ -#define __WEIGHTED_H__ +#ifndef __CXXGRAPH_WEIGHTED_H__ +#define __CXXGRAPH_WEIGHTED_H__ #pragma once @@ -64,4 +64,4 @@ namespace CXXGRAPH } -#endif // __WEIGHTED_H__ \ No newline at end of file +#endif // __CXXGRAPH_WEIGHTED_H__ \ No newline at end of file diff --git a/include/Partitioning/Partition.hpp b/include/Partitioning/Partition.hpp index 961c8cc21..c360ec5d5 100644 --- a/include/Partitioning/Partition.hpp +++ b/include/Partitioning/Partition.hpp @@ -17,8 +17,8 @@ /*** License: AGPL v3.0 ***/ /***********************************************************/ -#ifndef __PARTITION_H__ -#define __PARTITION_H__ +#ifndef __CXXGRAPH_PARTITION_H__ +#define __CXXGRAPH_PARTITION_H__ #pragma once @@ -366,4 +366,4 @@ namespace CXXGRAPH } -#endif // __PARTITION_H__ \ No newline at end of file +#endif // __CXXGRAPH_PARTITION_H__ \ No newline at end of file diff --git a/include/Partitioning/PartitioningStats.hpp b/include/Partitioning/PartitioningStats.hpp index 4d39dc16d..2b062b401 100644 --- a/include/Partitioning/PartitioningStats.hpp +++ b/include/Partitioning/PartitioningStats.hpp @@ -17,8 +17,8 @@ /*** License: AGPL v3.0 ***/ /***********************************************************/ -#ifndef __PARTITIONINGSTATS_H__ -#define __PARTITIONINGSTATS_H__ +#ifndef __CXXGRAPH_PARTITIONINGSTATS_H__ +#define __CXXGRAPH_PARTITIONINGSTATS_H__ #include #include "Utility/Typedef.hpp" @@ -66,4 +66,4 @@ namespace CXXGRAPH } -#endif // __PARTITIONINGSTATS_H__ \ No newline at end of file +#endif // __CXXGRAPH_PARTITIONINGSTATS_H__ \ No newline at end of file diff --git a/include/Utility/ConstString.hpp b/include/Utility/ConstString.hpp index 093ed1145..d3b266d1a 100644 --- a/include/Utility/ConstString.hpp +++ b/include/Utility/ConstString.hpp @@ -17,8 +17,8 @@ /*** License: AGPL v3.0 ***/ /***********************************************************/ -#ifndef __CONSTSTRING_H__ -#define __CONSTSTRING_H__ +#ifndef __CXXGRAPH_CONSTSTRING_H__ +#define __CXXGRAPH_CONSTSTRING_H__ #pragma once @@ -33,4 +33,4 @@ namespace CXXGRAPH constexpr char ERR_SOURCE_NODE_NOT_IN_GRAPH[] = "Source Node not inside Graph"; /////////////////////////////// } -#endif // __CONSTSTRING_H__ \ No newline at end of file +#endif // __CXXGRAPH_CONSTSTRING_H__ \ No newline at end of file diff --git a/include/Utility/ConstValue.hpp b/include/Utility/ConstValue.hpp index 73a3c06f9..dca5fdbcd 100644 --- a/include/Utility/ConstValue.hpp +++ b/include/Utility/ConstValue.hpp @@ -17,8 +17,8 @@ /*** License: AGPL v3.0 ***/ /***********************************************************/ -#ifndef __CONSTVALUE_H__ -#define __CONSTVALUE_H__ +#ifndef __CXXGRAPH_CONSTVALUE_H__ +#define __CXXGRAPH_CONSTVALUE_H__ #pragma once @@ -29,4 +29,4 @@ namespace CXXGRAPH constexpr double INF_DOUBLE = std::numeric_limits::max(); } -#endif // __CONSTVALUE_H__ \ No newline at end of file +#endif // __CXXGRAPH_CONSTVALUE_H__ \ No newline at end of file diff --git a/include/Utility/Reader.hpp b/include/Utility/Reader.hpp index 58e76d382..f57aa510b 100644 --- a/include/Utility/Reader.hpp +++ b/include/Utility/Reader.hpp @@ -17,8 +17,8 @@ /*** License: AGPL v3.0 ***/ /***********************************************************/ -#ifndef __READER_H__ -#define __READER_H__ +#ifndef __CXXGRAPH_READER_H__ +#define __CXXGRAPH_READER_H__ #pragma once // This is to make sure that this header is only included once @@ -43,4 +43,4 @@ namespace CXXGRAPH }; } -#endif // __READER_H__ \ No newline at end of file +#endif // __CXXGRAPH_READER_H__ \ No newline at end of file diff --git a/include/Utility/ThreadSafe.hpp b/include/Utility/ThreadSafe.hpp index 2314fb1bf..437f53b16 100644 --- a/include/Utility/ThreadSafe.hpp +++ b/include/Utility/ThreadSafe.hpp @@ -17,8 +17,8 @@ /*** License: AGPL v3.0 ***/ /***********************************************************/ -#ifndef __THREADSAFE_H__ -#define __THREADSAFE_H__ +#ifndef __CXXGRAPH_THREADSAFE_H__ +#define __CXXGRAPH_THREADSAFE_H__ #pragma once @@ -47,4 +47,4 @@ namespace CXXGRAPH } } -#endif // __THREADSAFE_H__ \ No newline at end of file +#endif // __CXXGRAPH_THREADSAFE_H__ \ No newline at end of file diff --git a/include/Utility/Writer.hpp b/include/Utility/Writer.hpp index d9fd6d4ce..ea688ee14 100644 --- a/include/Utility/Writer.hpp +++ b/include/Utility/Writer.hpp @@ -17,8 +17,8 @@ /*** License: AGPL v3.0 ***/ /***********************************************************/ -#ifndef __WRITER_H__ -#define __WRITER_H__ +#ifndef __CXXGRAPH_WRITER_H__ +#define __CXXGRAPH_WRITER_H__ #pragma once // This is to make sure that this header is only included once @@ -49,4 +49,4 @@ namespace CXXGRAPH }; } -#endif // __WRITER_H__ \ No newline at end of file +#endif // __CXXGRAPH_WRITER_H__ \ No newline at end of file