summaryrefslogtreecommitdiffstats
path: root/src/binary_location.h
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2022-08-16 16:38:19 -0400
committerDavid Robillard <d@drobilla.net>2022-08-16 16:38:19 -0400
commit66e0bb76b40311245b9c59e2f3167e4e98027eba (patch)
treef40786256d86cf31b1705417f0bfa018c6230577 /src/binary_location.h
parente53d14cebf13698a987fabfb996806a566e90dca (diff)
downloadpatchage-66e0bb76b40311245b9c59e2f3167e4e98027eba.tar.gz
patchage-66e0bb76b40311245b9c59e2f3167e4e98027eba.tar.bz2
patchage-66e0bb76b40311245b9c59e2f3167e4e98027eba.zip
Fix whitespace
Apparently clang-format changed its mind about special member functions, and binary_location.h was just never formatted to begin with.
Diffstat (limited to 'src/binary_location.h')
-rw-r--r--src/binary_location.h38
1 files changed, 19 insertions, 19 deletions
diff --git a/src/binary_location.h b/src/binary_location.h
index 0cc3688..12f726e 100644
--- a/src/binary_location.h
+++ b/src/binary_location.h
@@ -13,31 +13,31 @@ namespace patchage {
inline std::string
binary_location()
{
- Dl_info dli = {};
- const int ret = dladdr(reinterpret_cast<void*>(&binary_location), &dli);
- if (!ret) {
- return "";
- }
-
- char* const bin_loc = realpath(dli.dli_fname, nullptr);
- if (!bin_loc) {
- return "";
- }
-
- std::string loc{bin_loc};
- free(bin_loc);
- return loc;
+ Dl_info dli = {};
+ const int ret = dladdr(reinterpret_cast<void*>(&binary_location), &dli);
+ if (!ret) {
+ return "";
+ }
+
+ char* const bin_loc = realpath(dli.dli_fname, nullptr);
+ if (!bin_loc) {
+ return "";
+ }
+
+ std::string loc{bin_loc};
+ free(bin_loc);
+ return loc;
}
/** Return the absolute path of the bundle (binary parent directory). */
inline std::string
bundle_location()
{
- const std::string binary = binary_location();
- if (binary.empty()) {
- return "";
- }
- return binary.substr(0, binary.find_last_of('/'));
+ const std::string binary = binary_location();
+ if (binary.empty()) {
+ return "";
+ }
+ return binary.substr(0, binary.find_last_of('/'));
}
} // namespace patchage