Skip to content

Commit 0b59cea

Browse files
committed
Replace all #ifndef with #pragma once
1 parent 5284d39 commit 0b59cea

File tree

18 files changed

+18
-72
lines changed

18 files changed

+18
-72
lines changed

core/specfem/io/ASCII/ASCII.hpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
#ifndef _SPECFEM_IO_ASCII_HPP
2-
#define _SPECFEM_IO_ASCII_HPP
1+
#pragma once
32

43
#include "impl/dataset.hpp"
54
#include "impl/dataset.tpp"
@@ -33,5 +32,3 @@ template <typename OpType> class ASCII {
3332

3433
} // namespace io
3534
} // namespace specfem
36-
37-
#endif /* _SPECFEM_IO_ASCII_HPP */

core/specfem/io/ASCII/impl/dataset.hpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
#ifndef _SPECFEM_IO_ASCII_IMPL_DATASET_HPP
2-
#define _SPECFEM_IO_ASCII_IMPL_DATASET_HPP
1+
#pragma once
32

43
#include "datasetbase.hpp"
54
#include "native_type.hpp"
@@ -74,5 +73,3 @@ class Dataset : public DatasetBase<OpType> {
7473
} // namespace impl
7574
} // namespace io
7675
} // namespace specfem
77-
78-
#endif /* _SPECFEM_IO_ASCII_IMPL_DATASET_HPP */

core/specfem/io/ASCII/impl/datasetbase.hpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
#ifndef _SPECFEM_IO_ASCII_IMPL_DATASETBASE_HPP
2-
#define _SPECFEM_IO_ASCII_IMPL_DATASETBASE_HPP
1+
#pragma once
32

43
#include "native_type.hpp"
54
#include "native_type.tpp"
@@ -180,5 +179,3 @@ template <> class DatasetBase<specfem::io::read> {
180179
} // namespace impl
181180
} // namespace io
182181
} // namespace specfem
183-
184-
#endif /* _SPECFEM_IO_ASCII_IMPL_DATASETBASE_HPP */

core/specfem/io/ASCII/impl/file.hpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
#ifndef _SPECFEM_IO_ASCII_IMPL_FILE_HPP
2-
#define _SPECFEM_IO_ASCII_IMPL_FILE_HPP
1+
#pragma once
32

43
#include "group.hpp"
54
#include <boost/filesystem.hpp>
@@ -168,5 +167,3 @@ template <> class File<specfem::io::read> {
168167
} // namespace impl
169168
} // namespace io
170169
} // namespace specfem
171-
172-
#endif /* _SPECFEM_IO_ASCII_IMPL_FILE_HPP */

core/specfem/io/ASCII/impl/group.hpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
#ifndef _SPECFEM_IO_ASCII_IMPL_GROUP_HPP
2-
#define _SPECFEM_IO_ASCII_IMPL_GROUP_HPP
1+
#pragma once
32

43
#include <boost/filesystem.hpp>
54
#include <iostream>
@@ -176,5 +175,3 @@ template <> class Group<specfem::io::read> {
176175
} // namespace impl
177176
} // namespace io
178177
} // namespace specfem
179-
180-
#endif /* _SPECFEM_IO_ASCII_IMPL_GROUP_HPP */
Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
#ifndef _SPECFEM_IO_ASCII_IMPL_NATIVE_TYPE_HPP
2-
#define _SPECFEM_IO_ASCII_IMPL_NATIVE_TYPE_HPP
1+
#pragma once
32

43
namespace specfem {
54
namespace io {
@@ -11,5 +10,3 @@ template <typename T> struct native_type;
1110
} // namespace impl
1211
} // namespace io
1312
} // namespace specfem
14-
15-
#endif /* _SPECFEM_IO_ASCII_IMPL_NATIVE_TYPE_HPP */

core/specfem/io/HDF5/impl/file.hpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
#ifndef SPECFEM_IO_HDF5_IMPL_FILE_HPP
2-
#define SPECFEM_IO_HDF5_IMPL_FILE_HPP
1+
#pragma once
32

43
#ifndef NO_HDF5
54
#include "H5Cpp.h"
@@ -191,5 +190,3 @@ template <> class File<specfem::io::read> {
191190
} // namespace impl
192191
} // namespace io
193192
} // namespace specfem
194-
195-
#endif

core/specfem/io/HDF5/impl/group.hpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
#ifndef SPECFEM_IO_HDF5_IMPL_GROUP_HPP
2-
#define SPECFEM_IO_HDF5_IMPL_GROUP_HPP
1+
#pragma once
32

43
#ifndef NO_HDF5
54
#include "H5Cpp.h"
@@ -191,5 +190,3 @@ template <> class Group<specfem::io::read> {
191190
} // namespace impl
192191
} // namespace io
193192
} // namespace specfem
194-
195-
#endif

core/specfem/io/fortranio/fortran_io.hpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
#ifndef _FORTRAN_IO_HPP
2-
#define _FORTRAN_IO_HPP
1+
#pragma once
32

43
#include "specfem_setup.hpp"
54
#include <fstream>
@@ -47,5 +46,3 @@ void fortran_read_value(double *value, std::ifstream &stream,
4746
void fortran_read_value(int *value, std::ifstream &stream, int &buffer_length);
4847
} // namespace io
4948
} // namespace specfem
50-
51-
#endif

core/specfem/io/fortranio/interface.hpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
#ifndef _FORTRAN_IO_INTERFACE_HPP
2-
#define _FORTRAN_IO_INTERFACE_HPP
1+
#pragma once
32

43
#include "fortran_io.hpp"
54
#include "fortran_io.tpp"
@@ -32,5 +31,3 @@ template <typename... Args>
3231
void fortran_read_line(std::ifstream &stream, Args... values);
3332
} // namespace io
3433
} // namespace specfem
35-
36-
#endif

0 commit comments

Comments
 (0)