diff options
author | Remko Tronçon <git@el-tramo.be> | 2011-05-03 20:39:27 (GMT) |
---|---|---|
committer | Remko Tronçon <git@el-tramo.be> | 2011-05-05 19:43:14 (GMT) |
commit | 772b2ec0243d7b55d91e4027d828881d18093ed0 (patch) | |
tree | 83a58b2b97f3992165ee20c05e0630452eb50457 /Swiften/Base/Paths.cpp | |
parent | 0b3db8fd68abee7269d5a38aabd8a816e099eae5 (diff) | |
download | swift-contrib-772b2ec0243d7b55d91e4027d828881d18093ed0.zip swift-contrib-772b2ec0243d7b55d91e4027d828881d18093ed0.tar.bz2 |
Replace ByteArray by typedef.
Diffstat (limited to 'Swiften/Base/Paths.cpp')
-rw-r--r-- | Swiften/Base/Paths.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Swiften/Base/Paths.cpp b/Swiften/Base/Paths.cpp index d901ff9..b40f9b8 100644 --- a/Swiften/Base/Paths.cpp +++ b/Swiften/Base/Paths.cpp @@ -24,22 +24,22 @@ boost::filesystem::path Paths::getExecutablePath() { ByteArray path; uint32_t size = 4096; path.resize(size); - if (_NSGetExecutablePath(reinterpret_cast<char*>(path.getData()), &size) == 0) { - return boost::filesystem::path(std::string(reinterpret_cast<const char*>(path.getData()), path.getSize()).c_str()).parent_path(); + if (_NSGetExecutablePath(const_cast<char*>(reinterpret_cast<const char*>(vecptr(path))), &size) == 0) { + return boost::filesystem::path(std::string(reinterpret_cast<const char*>(vecptr(path)), path.size()).c_str()).parent_path(); } #elif defined(SWIFTEN_PLATFORM_LINUX) ByteArray path; path.resize(4096); - size_t size = readlink("/proc/self/exe", reinterpret_cast<char*>(path.getData()), path.getSize()); + size_t size = readlink("/proc/self/exe", reinterpret_cast<char*>(vecptr(path)), path.size()); if (size > 0) { path.resize(size); - return boost::filesystem::path(std::string(reinterpret_cast<const char*>(path.getData()), path.getSize()).c_str()).parent_path(); + return boost::filesystem::path(std::string(reinterpret_cast<const char*>(vecptr(path)), path.size()).c_str()).parent_path(); } #elif defined(SWIFTEN_PLATFORM_WINDOWS) ByteArray data; data.resize(2048); - GetModuleFileName(NULL, reinterpret_cast<char*>(data.getData()), data.getSize()); - return boost::filesystem::path(std::string(reinterpret_cast<const char*>(data.getData()), data.getSize()).c_str()).parent_path(); + GetModuleFileName(NULL, reinterpret_cast<char*>(vecptr(data)), data.size()); + return boost::filesystem::path(std::string(reinterpret_cast<const char*>(vecptr(data)), data.size()).c_str()).parent_path(); #endif return boost::filesystem::path(); } |