From 29b3207fe433497c60feff0b1f71b7fdb27412e1 Mon Sep 17 00:00:00 2001 From: Boroondas Gupte Date: Fri, 11 Feb 2011 01:27:01 +0100 Subject: OPEN-29 Error out if lldir_.h is included when building for a different platform As far as I know, there is no good reason to include e.g. indra/llvfs/lldir_win32.h while not building for a windows target, so be better prevent this to avoid hard to find errors. --- indra/llvfs/lldir_linux.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'indra/llvfs/lldir_linux.h') diff --git a/indra/llvfs/lldir_linux.h b/indra/llvfs/lldir_linux.h index 451e81ae93..c7cfe905f5 100644 --- a/indra/llvfs/lldir_linux.h +++ b/indra/llvfs/lldir_linux.h @@ -24,6 +24,10 @@ * $/LicenseInfo$ */ +#if !LL_LINUX +#error This header must not be included when compiling for any target other than Linux. Consider including lldir.h instead. +#endif // !LL_LINUX + #ifndef LL_LLDIR_LINUX_H #define LL_LLDIR_LINUX_H -- cgit v1.2.3 From 1c931920af96e8ef4fd7f923b58f23b2bee869ee Mon Sep 17 00:00:00 2001 From: Boroondas Gupte Date: Fri, 11 Feb 2011 01:41:34 +0100 Subject: OPEN-29 Cleanup: removed superflous "public:" Not related, just a while-I'm-at-it thing. --- indra/llvfs/lldir_linux.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/llvfs/lldir_linux.h') diff --git a/indra/llvfs/lldir_linux.h b/indra/llvfs/lldir_linux.h index c7cfe905f5..6015b25faa 100644 --- a/indra/llvfs/lldir_linux.h +++ b/indra/llvfs/lldir_linux.h @@ -44,7 +44,7 @@ public: /*virtual*/ void initAppDirs(const std::string &app_name, const std::string& app_read_only_data_dir); -public: + virtual std::string getCurPath(); virtual U32 countFilesInDir(const std::string &dirname, const std::string &mask); virtual BOOL getNextFileInDir(const std::string &dirname, const std::string &mask, std::string &fname); -- cgit v1.2.3 From 1d0001020716d3f3d3734dd4a4f8cd609bc2b215 Mon Sep 17 00:00:00 2001 From: Boroondas Gupte Date: Fri, 11 Feb 2011 02:09:20 +0100 Subject: OPEN-29 Cleanup: strip trailing whitespace As people will have to rebuild half the tree anyway, because these headers changed, we might as well prettify them a bit. --- indra/llvfs/lldir_linux.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/llvfs/lldir_linux.h') diff --git a/indra/llvfs/lldir_linux.h b/indra/llvfs/lldir_linux.h index 6015b25faa..a34de1241d 100644 --- a/indra/llvfs/lldir_linux.h +++ b/indra/llvfs/lldir_linux.h @@ -1,6 +1,6 @@ /** * @file lldir_linux.h - * @brief Definition of directory utilities class for linux + * @brief Definition of directory utilities class for linux * * $LicenseInfo:firstyear=2000&license=viewerlgpl$ * Second Life Viewer Source Code @@ -57,7 +57,7 @@ private: DIR *mDirp; int mCurrentDirIndex; int mCurrentDirCount; - std::string mCurrentDir; + std::string mCurrentDir; }; #endif // LL_LLDIR_LINUX_H -- cgit v1.2.3