aboutsummaryrefslogtreecommitdiff
path: root/src/libstore
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2012-07-18 14:59:03 -0400
committerEelco Dolstra <eelco.dolstra@logicblox.com>2012-07-18 14:59:03 -0400
commitb7fd2c28224a69476434d69b5d9da3d150c07226 (patch)
tree7bff185e6c7974605740718233fe052e1ce149cd /src/libstore
parent58337e0e6122a97061dcf803954f72469f67afca (diff)
Use "#pragma once" to prevent repeated header file inclusion
Diffstat (limited to 'src/libstore')
-rw-r--r--src/libstore/derivations.hh6
-rw-r--r--src/libstore/globals.hh6
-rw-r--r--src/libstore/local-store.hh6
-rw-r--r--src/libstore/misc.hh6
-rw-r--r--src/libstore/pathlocks.hh6
-rw-r--r--src/libstore/references.hh5
-rw-r--r--src/libstore/remote-store.hh6
-rw-r--r--src/libstore/store-api.hh6
-rw-r--r--src/libstore/worker-protocol.hh7
9 files changed, 9 insertions, 45 deletions
diff --git a/src/libstore/derivations.hh b/src/libstore/derivations.hh
index 27e471d88..8f22b4afa 100644
--- a/src/libstore/derivations.hh
+++ b/src/libstore/derivations.hh
@@ -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 */
diff --git a/src/libstore/globals.hh b/src/libstore/globals.hh
index 12a9b9ca1..1c0877a5e 100644
--- a/src/libstore/globals.hh
+++ b/src/libstore/globals.hh
@@ -1,5 +1,4 @@
-#ifndef __GLOBALS_H
-#define __GLOBALS_H
+#pragma once
#include "types.hh"
@@ -118,6 +117,3 @@ void setDefaultsFromEnvironment();
}
-
-
-#endif /* !__GLOBALS_H */
diff --git a/src/libstore/local-store.hh b/src/libstore/local-store.hh
index 65ee029c2..eb7705219 100644
--- a/src/libstore/local-store.hh
+++ b/src/libstore/local-store.hh
@@ -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 */
diff --git a/src/libstore/misc.hh b/src/libstore/misc.hh
index 850c12af4..fe0bbdd79 100644
--- a/src/libstore/misc.hh
+++ b/src/libstore/misc.hh
@@ -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 */
diff --git a/src/libstore/pathlocks.hh b/src/libstore/pathlocks.hh
index 57ca1584a..8a6b1450d 100644
--- a/src/libstore/pathlocks.hh
+++ b/src/libstore/pathlocks.hh
@@ -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 */
diff --git a/src/libstore/references.hh b/src/libstore/references.hh
index 158c08a77..013809d12 100644
--- a/src/libstore/references.hh
+++ b/src/libstore/references.hh
@@ -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 */
diff --git a/src/libstore/remote-store.hh b/src/libstore/remote-store.hh
index f0e5dbf76..c57b49ce1 100644
--- a/src/libstore/remote-store.hh
+++ b/src/libstore/remote-store.hh
@@ -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 */
diff --git a/src/libstore/store-api.hh b/src/libstore/store-api.hh
index 0ab15c380..9ba67852e 100644
--- a/src/libstore/store-api.hh
+++ b/src/libstore/store-api.hh
@@ -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 */
diff --git a/src/libstore/worker-protocol.hh b/src/libstore/worker-protocol.hh
index b08410fa1..501c0b3db 100644
--- a/src/libstore/worker-protocol.hh
+++ b/src/libstore/worker-protocol.hh
@@ -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 */