[arrayfire] 53/84: Using vector<string> in unified for extra paths
Ghislain Vaillant
ghisvail-guest at moszumanska.debian.org
Mon Jan 4 23:22:24 UTC 2016
This is an automated email from the git hooks/post-receive script.
ghisvail-guest pushed a commit to branch master
in repository arrayfire.
commit 7a93d9a2a7f3b96427be352fb0f6892131326eb0
Author: Shehzan Mohammed <shehzan at arrayfire.com>
Date: Mon Dec 28 15:06:39 2015 -0500
Using vector<string> in unified for extra paths
---
src/api/unified/symbol_manager.cpp | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/src/api/unified/symbol_manager.cpp b/src/api/unified/symbol_manager.cpp
index 0746eb9..f79dc6d 100644
--- a/src/api/unified/symbol_manager.cpp
+++ b/src/api/unified/symbol_manager.cpp
@@ -127,15 +127,15 @@ LibHandle openDynLibrary(const int bknd_idx, int flag=RTLD_LAZY)
* /usr/local/arrayfire-3/lib
*/
if (retVal == NULL) {
- static const char* extraLibPaths[] = {"/opt/arrayfire-3/lib/",
- "/opt/arrayfire/lib/",
- "/usr/local/lib/",
- "/usr/local/arrayfire-3/lib/",
- "/usr/local/arrayfire/lib/",
- };
- const int nPaths = sizeof(extraLibPaths) / sizeof(extraLibPaths[0]);
+ static
+ std::vector<std::string> extraLibPaths {"/opt/arrayfire-3/lib/",
+ "/opt/arrayfire/lib/",
+ "/usr/local/lib/",
+ "/usr/local/arrayfire-3/lib/",
+ "/usr/local/arrayfire/lib/",
+ };
- for (int i = 0; i < nPaths; ++i) {
+ for (int i = 0; i < (int)extraLibPaths.size(); ++i) {
string abs_path = extraLibPaths[i] + bkndLibName;
retVal = dlopen(abs_path.c_str(), flag);
if (retVal != NULL) {
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/arrayfire.git
More information about the debian-science-commits
mailing list