summaryrefslogtreecommitdiff
path: root/gnuradio-runtime
diff options
context:
space:
mode:
authorMartin Braun <martin@gnuradio.org>2021-01-20 15:35:52 +0100
committerMartin Braun <martin@gnuradio.org>2021-01-20 09:06:05 -0800
commit4eb0eb91f11faa2aa9c6cc970a61647bf206ce31 (patch)
tree0ef2bbad8f95fbe60b3aa9cb1e855522ba9c36ae /gnuradio-runtime
parentedd44881e20eddb2c6502d18309678ce3f4ac316 (diff)
lib: Clang-format constants.cc.in
Because we always used globs to find the files we re-format, this slipped under the clang-format-radar. Signed-off-by: Martin Braun <martin@gnuradio.org>
Diffstat (limited to 'gnuradio-runtime')
-rw-r--r--gnuradio-runtime/lib/constants.cc.in126
1 files changed, 43 insertions, 83 deletions
diff --git a/gnuradio-runtime/lib/constants.cc.in b/gnuradio-runtime/lib/constants.cc.in
index 0f316935d5..166a322da3 100644
--- a/gnuradio-runtime/lib/constants.cc.in
+++ b/gnuradio-runtime/lib/constants.cc.in
@@ -12,99 +12,59 @@
#include <config.h>
#endif
-#include <stdlib.h>
#include <gnuradio/constants.h>
+#include <stdlib.h>
namespace gr {
- const std::string
- prefix()
- {
- //Use "GR_PREFIX" environment variable when specified
- const char *prefix = getenv("GR_PREFIX");
- if (prefix != NULL) return prefix;
+const std::string prefix()
+{
+ // Use "GR_PREFIX" environment variable when specified
+ const char* prefix = getenv("GR_PREFIX");
+ if (prefix != NULL)
+ return prefix;
return "@prefix@";
- }
-
- const std::string
- sysconfdir()
- {
- //Provide the sysconfdir in terms of prefix()
- //when the "GR_PREFIX" environment var is specified.
- if (getenv("GR_PREFIX") != NULL)
- {
- return prefix() + "/@GR_CONF_DIR@";
+}
+
+const std::string sysconfdir()
+{
+ // Provide the sysconfdir in terms of prefix()
+ // when the "GR_PREFIX" environment var is specified.
+ if (getenv("GR_PREFIX") != NULL) {
+ return prefix() + "/@GR_CONF_DIR@";
}
return "@SYSCONFDIR@";
- }
-
- const std::string
- prefsdir()
- {
- //Provide the prefsdir in terms of sysconfdir()
- //when the "GR_PREFIX" environment var is specified.
- if (getenv("GR_PREFIX") != NULL)
- {
- return sysconfdir() + "/@CMAKE_PROJECT_NAME@/conf.d";
+}
+
+const std::string prefsdir()
+{
+ // Provide the prefsdir in terms of sysconfdir()
+ // when the "GR_PREFIX" environment var is specified.
+ if (getenv("GR_PREFIX") != NULL) {
+ return sysconfdir() + "/@CMAKE_PROJECT_NAME@/conf.d";
}
return "@GR_PREFSDIR@";
- }
-
- const std::string
- build_date()
- {
- return "@BUILD_DATE@";
- }
-
- const std::string
- version()
- {
- return "@VERSION@";
- }
-
- // Return individual parts of the version
- const std::string
- major_version()
- {
- return "@MAJOR_VERSION@";
- }
-
- const std::string
- api_version()
- {
- return "@API_COMPAT@";
- }
-
- const std::string
- minor_version()
- {
- return "@MINOR_VERSION@";
- }
-
- const std::string
- c_compiler()
- {
- return "@cmake_c_compiler_version@";
- }
-
- const std::string
- cxx_compiler()
- {
- return "@cmake_cxx_compiler_version@";
- }
-
- const std::string
- compiler_flags()
- {
- return "@COMPILER_INFO@";
- }
-
- const std::string
- build_time_enabled_components()
- {
- return "@_gr_enabled_components@";
- }
+}
+
+const std::string build_date() { return "@BUILD_DATE@"; }
+
+const std::string version() { return "@VERSION@"; }
+
+// Return individual parts of the version
+const std::string major_version() { return "@MAJOR_VERSION@"; }
+
+const std::string api_version() { return "@API_COMPAT@"; }
+
+const std::string minor_version() { return "@MINOR_VERSION@"; }
+
+const std::string c_compiler() { return "@cmake_c_compiler_version@"; }
+
+const std::string cxx_compiler() { return "@cmake_cxx_compiler_version@"; }
+
+const std::string compiler_flags() { return "@COMPILER_INFO@"; }
+
+const std::string build_time_enabled_components() { return "@_gr_enabled_components@"; }
} /* namespace gr */