Skip to content

Commit b219059

Browse files
authored
Removed EOF naming convention at end of file every file and replaced #ifdef include guards with #pragma once. (#3300)
* removed EOF at end of file and #ifdef include guards * Remove EOF newline in discord.hpp
1 parent 4340fdf commit b219059

File tree

902 files changed

+1196
-4374
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

902 files changed

+1196
-4374
lines changed

CODINGSTYLE.md

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,6 @@ organisation on Github, not directly included from upstream.
2525

2626
Do not have spaces at the end of lines.
2727

28-
Files should always end with `/* EOF */` and a newline or a similar
29-
marker approprimate for the given language. This marker can be left
30-
out for fileformats that have an end tag, e.g. `</html>`.
31-
3228
Aim for one file per class, small helper classes in the same file are ok.
3329

3430
## Includes
@@ -61,8 +57,7 @@ Conditional includes should be indented.
6157
Include guards are of the form:
6258

6359
```c++
64-
#ifndef HEADER_SUPERTUX_{PATH}_{FILE}_HPP
65-
#define HEADER_SUPERTUX_{PATH}_{FILE}_HPP
60+
#pragma once
6661
```
6762

6863
`tools/fix_include_guards.sh` is a little script that will help to fix

src/addon/addon.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -257,5 +257,3 @@ Addon::requires_restart() const
257257
// Determines if the add-on requires a restart to function after enabled.
258258
return m_type == LANGUAGEPACK;
259259
}
260-
261-
/* EOF */

src/addon/addon.hpp

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@
1515
// You should have received a copy of the GNU General Public License
1616
// along with this program. If not, see <http://www.gnu.org/licenses/>.
1717

18-
#ifndef HEADER_SUPERTUX_ADDON_ADDON_HPP
19-
#define HEADER_SUPERTUX_ADDON_ADDON_HPP
18+
#pragma once
2019

2120
#include <memory>
2221
#include <vector>
@@ -114,7 +113,3 @@ namespace addon_string_util {
114113
std::string generate_menu_item_text(const Addon& addon);
115114
std::string get_addon_plural_form(size_t count);
116115
}
117-
118-
#endif
119-
120-
/* EOF */

src/addon/addon_manager.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1003,5 +1003,3 @@ AddonManager::onDownloadAborted(int id)
10031003
m_downloader.onDownloadAborted(id);
10041004
}
10051005
#endif
1006-
1007-
/* EOF */

src/addon/addon_manager.hpp

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@
1515
// You should have received a copy of the GNU General Public License
1616
// along with this program. If not, see <http://www.gnu.org/licenses/>.
1717

18-
#ifndef HEADER_SUPERTUX_ADDON_ADDON_MANAGER_HPP
19-
#define HEADER_SUPERTUX_ADDON_ADDON_MANAGER_HPP
18+
#pragma once
2019

2120
#include <memory>
2221
#include <string>
@@ -123,7 +122,3 @@ class AddonManager final : public Currenton<AddonManager>
123122
AddonManager(const AddonManager&) = delete;
124123
AddonManager& operator=(const AddonManager&) = delete;
125124
};
126-
127-
#endif
128-
129-
/* EOF */

src/addon/downloader.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -734,5 +734,3 @@ Downloader::onDownloadAborted(int id)
734734
}
735735
}
736736
#endif
737-
738-
/* EOF */

src/addon/downloader.hpp

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@
1616
// You should have received a copy of the GNU General Public License
1717
// along with this program. If not, see <http://www.gnu.org/licenses/>.
1818

19-
#ifndef HEADER_SUPERTUX_ADDON_DOWNLOADER_HPP
20-
#define HEADER_SUPERTUX_ADDON_DOWNLOADER_HPP
19+
#pragma once
2120

2221
#ifndef EMSCRIPTEN
2322
#include <curl/curl.h>
@@ -156,7 +155,3 @@ class Downloader final
156155
Downloader(const Downloader&) = delete;
157156
Downloader& operator=(const Downloader&) = delete;
158157
};
159-
160-
#endif
161-
162-
/* EOF */

src/addon/md5.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -404,5 +404,3 @@ inline void MD5::II(uint32_t& a, uint32_t b, uint32_t c, uint32_t d, uint32_t x,
404404
a += I(b, c, d) + x + ac;
405405
a = rotate_left (a, s) +b;
406406
}
407-
408-
/* EOF */

src/addon/md5.hpp

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,7 @@
4141
// documentation and/or software.
4242
//
4343

44-
#ifndef HEADER_SUPERTUX_ADDON_MD5_HPP
45-
#define HEADER_SUPERTUX_ADDON_MD5_HPP
44+
#pragma once
4645

4746
#include <fstream>
4847
#include <stdint.h>
@@ -92,7 +91,3 @@ class MD5
9291
static inline void II(uint32_t& a, uint32_t b, uint32_t c, uint32_t d, uint32_t x, uint32_t s, uint32_t ac);
9392

9493
};
95-
96-
#endif
97-
98-
/* EOF */

src/audio/dummy_sound_source.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,5 +89,3 @@ std::unique_ptr<SoundSource> create_dummy_sound_source()
8989
{
9090
return std::make_unique<DummySoundSource>();
9191
}
92-
93-
/* EOF */

0 commit comments

Comments
 (0)