Use "#pragma once" to prevent repeated header file inclusion

This commit is contained in:
Eelco Dolstra 2012-07-18 14:59:03 -04:00
parent 58337e0e61
commit b7fd2c2822
32 changed files with 31 additions and 166 deletions

View file

@ -1,5 +1,4 @@
#ifndef __DERIVATIONS_H
#define __DERIVATIONS_H
#pragma once
#include <map>
@ -81,6 +80,3 @@ typedef std::map<Path, Hash> DrvHashes;
extern DrvHashes drvHashes;
}
#endif /* !__DERIVATIONS_H */

View file

@ -1,5 +1,4 @@
#ifndef __GLOBALS_H
#define __GLOBALS_H
#pragma once
#include "types.hh"
@ -118,6 +117,3 @@ void setDefaultsFromEnvironment();
}
#endif /* !__GLOBALS_H */

View file

@ -1,5 +1,4 @@
#ifndef __LOCAL_STORE_H
#define __LOCAL_STORE_H
#pragma once
#include <string>
@ -302,6 +301,3 @@ void deletePathWrapped(const Path & path,
void deletePathWrapped(const Path & path);
}
#endif /* !__LOCAL_STORE_H */

View file

@ -1,5 +1,4 @@
#ifndef __MISC_H
#define __MISC_H
#pragma once
#include "derivations.hh"
@ -35,6 +34,3 @@ void queryMissing(StoreAPI & store, const PathSet & targets,
}
#endif /* !__MISC_H */

View file

@ -1,5 +1,4 @@
#ifndef __PATHLOCKS_H
#define __PATHLOCKS_H
#pragma once
#include "types.hh"
@ -44,6 +43,3 @@ bool pathIsLockedByMe(const Path & path);
}
#endif /* !__PATHLOCKS_H */

View file

@ -1,5 +1,4 @@
#ifndef __REFERENCES_H
#define __REFERENCES_H
#pragma once
#include "types.hh"
#include "hash.hh"
@ -10,5 +9,3 @@ PathSet scanForReferences(const Path & path, const PathSet & refs,
HashResult & hash);
}
#endif /* !__REFERENCES_H */

View file

@ -1,5 +1,4 @@
#ifndef __REMOTE_STORE_H
#define __REMOTE_STORE_H
#pragma once
#include <string>
@ -101,6 +100,3 @@ private:
}
#endif /* !__REMOTE_STORE_H */

View file

@ -1,5 +1,4 @@
#ifndef __STOREAPI_H
#define __STOREAPI_H
#pragma once
#include "hash.hh"
#include "serialise.hh"
@ -356,6 +355,3 @@ MakeError(BuildError, Error) /* denotes a permanent build failure */
}
#endif /* !__STOREAPI_H */

View file

@ -1,6 +1,4 @@
#ifndef __WORKER_PROTOCOL_H
#define __WORKER_PROTOCOL_H
#pragma once
namespace nix {
@ -64,6 +62,3 @@ template<class T> T readStorePaths(Source & from);
}
#endif /* !__WORKER_PROTOCOL_H */