Team612 / 612-2016

FRC Team 612's 2016 code for First Stronghold
GNU General Public License v2.0
9 stars 6 forks source link

Change all examples of include guards to pragma once #174

Closed CDietzel closed 8 years ago

CDietzel commented 8 years ago

In EVERY .H FILE in the repo, replace the

#ifndef WHATEVER
#define WHATEVER
// code
#endif WHATEVER

with

#pragma once
// code as before

Literally just delete the include guards and add the #pragma once to the beginning of the file.

I want this done by a new programmer.

WardBenjamin commented 8 years ago

:+1: This looks much better and I've been doing it in the code I write.

Ahmad-Bamba commented 8 years ago

I've been thinking about this myself. My only complaint is that Eclipse automatically generates include guards, so it might be a pain when adding future files

WardBenjamin commented 8 years ago

This can be changed in Eclipse. The setting is located at Window/Preferences/C++/Code Templates/Files/C++ Header File/Default C++ header template.

CDietzel commented 8 years ago

@DavidRow Read my pull request comments.

CDietzel commented 8 years ago

Now it is actually finished. Good job.