From 1a974f227de5f3d6c42dd5b836acab8edd28171c Mon Sep 17 00:00:00 2001 From: callum_linden Date: Mon, 20 Oct 2014 11:21:54 -0700 Subject: Update to build on Xcode 6.0: typedef declared protected incorrectly here --- indra/llappearance/llwearable.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'indra/llappearance/llwearable.h') diff --git a/indra/llappearance/llwearable.h b/indra/llappearance/llwearable.h index 406fc7e883..630eb1e3a5 100755 --- a/indra/llappearance/llwearable.h +++ b/indra/llappearance/llwearable.h @@ -113,6 +113,9 @@ public: // Update the baked texture hash. virtual void addToBakedTextureHash(LLMD5& hash) const = 0; + typedef std::map visual_param_index_map_t; + visual_param_index_map_t mVisualParamIndexMap; + protected: typedef std::map te_map_t; void syncImages(te_map_t &src, te_map_t &dst); @@ -132,9 +135,6 @@ protected: typedef std::map param_map_t; param_map_t mSavedVisualParamMap; // last saved version of visual params - typedef std::map visual_param_index_map_t; - visual_param_index_map_t mVisualParamIndexMap; - te_map_t mTEMap; // maps TE to LocalTextureObject te_map_t mSavedTEMap; // last saved version of TEMap }; -- cgit v1.2.3 From ae6440eecc4d6c018a3634c2c06052757bde962f Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Wed, 28 Jan 2015 15:55:18 -0500 Subject: MAINT-4744: Eliminate viewer dependency on (old) GNU libstdc++. To be more accurate, this changeset doesn't actually eliminate the dependency: it eliminates the use cases for the llifstream / llofstream feature that requires it. Currently you can construct an llifstream or llofstream from an open LLFILE* file handle (or, except on Windows, an int file descriptor). But rather than containing a streambuf implementation based on FILE*, llfile.h relies on the fact that the Windows std::filebuf happens to support that as a nonstandard extension; also on a nonstandard GNU extension __gnu_cxx::stdio_filebuf. To move from GNU libstdc++ to clang's libc++ (the direction on Mac), we could code a streambuf that supports FILE*. But before doing that, it's worth asking whether anyone actually uses this questionable feature. In fact there were only two methods: LLWearable::exportFile() and importFile() -- and only one call to either, in LLViewerWearable::saveNewAsset(). The code in saveNewAsset() opened the LLFILE* immediately before calling exportFile(), meaning we could reasonably push the open operation down into exportFile(). That logic was complex anyway due to the need for the caller to close the LLFILE* regardless of the success of the exportFile(). Change LLWearable::exportFile() and importFile() to accept a std::string filename rather than an open LLFILE*. Change LLViewerWearable::saveNewAsset() to simply call exportFile(filename) rather than horsing around with an LLFILE* handle. (This improves the code in another way too: it encapsulates the need to open the relevant file in binary mode. Previously, each caller had to remember to do that.) To prevent inadvertent reintroduction of ll[io]fstream(LLFILE*) code, add llstream_LLFILE preprocessor macro (default 0) to control access to the relevant constructors. Also suppress rdbuf() override, the only method whose signature references llstdio_filebuf. --- indra/llappearance/llwearable.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/llappearance/llwearable.h') diff --git a/indra/llappearance/llwearable.h b/indra/llappearance/llwearable.h index 630eb1e3a5..875c2932f1 100755 --- a/indra/llappearance/llwearable.h +++ b/indra/llappearance/llwearable.h @@ -81,8 +81,8 @@ public: SUCCESS, BAD_HEADER }; - BOOL exportFile(LLFILE* file) const; - EImportResult importFile(LLFILE* file, LLAvatarAppearance* avatarp ); + BOOL exportFile(const std::string& filename) const; + EImportResult importFile(const std::string& filename, LLAvatarAppearance* avatarp ); virtual BOOL exportStream( std::ostream& output_stream ) const; virtual EImportResult importStream( std::istream& input_stream, LLAvatarAppearance* avatarp ); -- cgit v1.2.3