Further header cleanup and a few updates

Updated llstring to current linden
Further linden_common cleanup
Header cleanup
Raised banlines to 5000 as per linden server change
Included missing llmediaentry.cpp file
Minor whitespace changes here and there
This commit is contained in:
Drake Arconis
2012-07-21 03:01:42 -04:00
parent 1e81966b89
commit 0d3fab40e5
31 changed files with 1143 additions and 182 deletions

View File

@@ -38,7 +38,6 @@
#include "llcharacter.h"
#include "llstring.h"
#include "llfasttimer.h"
#define SKEL_HEADER "Linden Skeleton 1.0"

View File

@@ -250,9 +250,9 @@ BOOL LLHeadRotMotion::onUpdate(F32 time, U8* joint_mask)
head_rot_local = nlerp(head_slerp_amt, mLastHeadRot, head_rot_local);
mLastHeadRot = head_rot_local;
if(mNeckState->getJoint() && mNeckState->getJoint()->getParent()) //Guess this has crashed? Taken from snowglobe -Shyotl
// Set the head rotation.
if(mNeckState->getJoint() && mNeckState->getJoint()->getParent())
{
// Set the head rotation.
LLQuaternion torsoRotLocal = mNeckState->getJoint()->getParent()->getWorldRotation() * currentInvRootRotWorld;
head_rot_local = head_rot_local * ~torsoRotLocal;
mNeckState->setRotation( nlerp(NECK_LAG, LLQuaternion::DEFAULT, head_rot_local) );

View File

@@ -637,9 +637,9 @@ void LLMotionController::updateMotionsByType(LLMotion::LLMotionBlendType anim_ty
motionp->fadeIn();
}
// **********************
//**********************
// MOTION INACTIVE
// **********************
//**********************
if (motionp->isStopped() && mAnimTime > motionp->getStopTime() + motionp->getEaseOutDuration())
{
// this motion has gone on too long, deactivate it
@@ -659,9 +659,9 @@ void LLMotionController::updateMotionsByType(LLMotion::LLMotionBlendType anim_ty
}
}
// **********************
//**********************
// MOTION EASE OUT
// **********************
//**********************
else if (motionp->isStopped() && mAnimTime > motionp->getStopTime())
{
// is this the first iteration in the ease out phase?
@@ -684,9 +684,9 @@ void LLMotionController::updateMotionsByType(LLMotion::LLMotionBlendType anim_ty
update_result = motionp->onUpdate(mAnimTime - motionp->mActivationTimestamp, last_joint_signature);
}
// **********************
//**********************
// MOTION ACTIVE
// **********************
//**********************
else if (mAnimTime > motionp->mActivationTimestamp + motionp->getEaseInDuration())
{
posep->setWeight(motionp->getFadeWeight());
@@ -707,9 +707,9 @@ void LLMotionController::updateMotionsByType(LLMotion::LLMotionBlendType anim_ty
update_result = motionp->onUpdate(mAnimTime - motionp->mActivationTimestamp, last_joint_signature);
}
// **********************
//**********************
// MOTION EASE IN
// **********************
//**********************
else if (mAnimTime >= motionp->mActivationTimestamp)
{
if (mLastTime < motionp->mActivationTimestamp)

View File

@@ -93,6 +93,7 @@ class LLVisualParam
{
public:
typedef boost::function<LLVisualParam*(S32)> visual_param_mapper;
LLVisualParam();
virtual ~LLVisualParam();

View File

@@ -60,16 +60,11 @@
#include <ctime>
#include <iosfwd>
// *TODO: Eliminate these, most library .cpp files don't need them.
// Add them to llviewerprecompiledheaders.h if necessary.
#include <list>
// Linden only libs in alpha-order other than stdtypes.h
// *NOTE: Please keep includes here to a minimum, see above.
#include "stdtypes.h"
#include "lldefs.h"
#include "llerror.h"
#include "llfile.h"
#include "llformat.h"
#endif

View File

@@ -34,7 +34,6 @@
#include "llstring.h"
#include "llerror.h"
#include "llfasttimer.h"
#if LL_WINDOWS
#define WIN32_LEAN_AND_MEAN
@@ -604,16 +603,10 @@ std::string utf8str_removeCRLF(const std::string& utf8str)
}
const char CR = 13;
S32 i = utf8str.find(CR);
if(i == std::string::npos)
return utf8str; //Save us from a reserve call.
std::string out;
out.reserve(utf8str.length());
const S32 len = (S32)utf8str.length();
if(i)
out.assign(utf8str,0,i); //Copy previous text to buffer
for( ++i; i < len; i++ )
for( S32 i = 0; i < len; i++ )
{
if( utf8str[i] != CR )
{

View File

@@ -35,11 +35,10 @@
#include <string>
#include <cstdio>
#include <algorithm>
#include <map>
#include <locale>
#include <iomanip>
#include "llsd.h"
#include "llfasttimer.h"
#if LL_LINUX || LL_SOLARIS
#include <wctype.h>
@@ -47,6 +46,7 @@
#endif
#include <string.h>
#include <boost/scoped_ptr.hpp>
#if LL_SOLARIS
// stricmp and strnicmp do not exist on Solaris:
@@ -246,40 +246,77 @@ private:
static std::string sLocale;
public:
typedef typename std::basic_string<T>::size_type size_type;
typedef std::basic_string<T> string_type;
typedef typename string_type::size_type size_type;
public:
/////////////////////////////////////////////////////////////////////////////////////////
// Static Utility functions that operate on std::strings
static const std::basic_string<T> null;
static const string_type null;
typedef std::map<LLFormatMapString, LLFormatMapString> format_map_t;
LL_COMMON_API static void getTokens(const std::basic_string<T>& instr, std::vector<std::basic_string<T> >& tokens, const std::basic_string<T>& delims);
LL_COMMON_API static void formatNumber(std::basic_string<T>& numStr, std::basic_string<T> decimals);
LL_COMMON_API static bool formatDatetime(std::basic_string<T>& replacement, std::basic_string<T> token, std::basic_string<T> param, S32 secFromEpoch);
LL_COMMON_API static S32 format(std::basic_string<T>& s, const format_map_t& substitutions);
LL_COMMON_API static S32 format(std::basic_string<T>& s, const LLSD& substitutions);
LL_COMMON_API static bool simpleReplacement(std::basic_string<T>& replacement, std::basic_string<T> token, const format_map_t& substitutions);
LL_COMMON_API static bool simpleReplacement(std::basic_string<T>& replacement, std::basic_string<T> token, const LLSD& substitutions);
/// considers any sequence of delims as a single field separator
LL_COMMON_API static void getTokens(const string_type& instr,
std::vector<string_type >& tokens,
const string_type& delims);
/// like simple scan overload, but returns scanned vector
static std::vector<string_type> getTokens(const string_type& instr,
const string_type& delims);
/// add support for keep_delims and quotes (either could be empty string)
static void getTokens(const string_type& instr,
std::vector<string_type>& tokens,
const string_type& drop_delims,
const string_type& keep_delims,
const string_type& quotes=string_type());
/// like keep_delims-and-quotes overload, but returns scanned vector
static std::vector<string_type> getTokens(const string_type& instr,
const string_type& drop_delims,
const string_type& keep_delims,
const string_type& quotes=string_type());
/// add support for escapes (could be empty string)
static void getTokens(const string_type& instr,
std::vector<string_type>& tokens,
const string_type& drop_delims,
const string_type& keep_delims,
const string_type& quotes,
const string_type& escapes);
/// like escapes overload, but returns scanned vector
static std::vector<string_type> getTokens(const string_type& instr,
const string_type& drop_delims,
const string_type& keep_delims,
const string_type& quotes,
const string_type& escapes);
LL_COMMON_API static void formatNumber(string_type& numStr, string_type decimals);
LL_COMMON_API static bool formatDatetime(string_type& replacement, string_type token, string_type param, S32 secFromEpoch);
LL_COMMON_API static S32 format(string_type& s, const format_map_t& substitutions);
LL_COMMON_API static S32 format(string_type& s, const LLSD& substitutions);
LL_COMMON_API static bool simpleReplacement(string_type& replacement, string_type token, const format_map_t& substitutions);
LL_COMMON_API static bool simpleReplacement(string_type& replacement, string_type token, const LLSD& substitutions);
LL_COMMON_API static void setLocale (std::string inLocale);
LL_COMMON_API static std::string getLocale (void);
static bool isValidIndex(const std::basic_string<T>& string, size_type i)
static bool isValidIndex(const string_type& string, size_type i)
{
return !string.empty() && (0 <= i) && (i <= string.size());
}
static void trimHead(std::basic_string<T>& string);
static void trimTail(std::basic_string<T>& string);
static void trim(std::basic_string<T>& string) { trimHead(string); trimTail(string); }
static void truncate(std::basic_string<T>& string, size_type count);
static bool contains(const string_type& string, T c, size_type i=0)
{
return string.find(c, i) != string_type::npos;
}
static void toUpper(std::basic_string<T>& string);
static void toLower(std::basic_string<T>& string);
static void trimHead(string_type& string);
static void trimTail(string_type& string);
static void trim(string_type& string) { trimHead(string); trimTail(string); }
static void truncate(string_type& string, size_type count);
static void toUpper(string_type& string);
static void toLower(string_type& string);
// True if this is the head of s.
static BOOL isHead( const std::basic_string<T>& string, const T* s );
static BOOL isHead( const string_type& string, const T* s );
/**
* @brief Returns true if string starts with substr
@@ -287,8 +324,8 @@ public:
* If etither string or substr are empty, this method returns false.
*/
static bool startsWith(
const std::basic_string<T>& string,
const std::basic_string<T>& substr);
const string_type& string,
const string_type& substr);
/**
* @brief Returns true if string ends in substr
@@ -296,19 +333,32 @@ public:
* If etither string or substr are empty, this method returns false.
*/
static bool endsWith(
const std::basic_string<T>& string,
const std::basic_string<T>& substr);
const string_type& string,
const string_type& substr);
static void addCRLF(std::basic_string<T>& string);
static void removeCRLF(std::basic_string<T>& string);
static void addCRLF(string_type& string);
static void removeCRLF(string_type& string);
static void replaceTabsWithSpaces( std::basic_string<T>& string, size_type spaces_per_tab );
static void replaceNonstandardASCII( std::basic_string<T>& string, T replacement );
static void replaceChar( std::basic_string<T>& string, T target, T replacement );
static void replaceString( std::basic_string<T>& string, std::basic_string<T> target, std::basic_string<T> replacement );
static void replaceTabsWithSpaces( string_type& string, size_type spaces_per_tab );
static void replaceNonstandardASCII( string_type& string, T replacement );
static void replaceChar( string_type& string, T target, T replacement );
static void replaceString( string_type& string, string_type target, string_type replacement );
static BOOL containsNonprintable(const std::basic_string<T>& string);
static void stripNonprintable(std::basic_string<T>& string);
static BOOL containsNonprintable(const string_type& string);
static void stripNonprintable(string_type& string);
/**
* Double-quote an argument string if needed, unless it's already
* double-quoted. Decide whether it's needed based on the presence of any
* character in @a triggers (default space or double-quote). If we quote
* it, escape any embedded double-quote with the @a escape string (default
* backslash).
*
* Passing triggers="" means always quote, unless it's already double-quoted.
*/
static string_type quote(const string_type& str,
const string_type& triggers=" \"",
const string_type& escape="\\");
/**
* @brief Unsafe way to make ascii characters. You should probably
@@ -317,18 +367,18 @@ public:
* The 2 and 4 byte std::string probably work, so LLWStringUtil::_makeASCII
* should work.
*/
static void _makeASCII(std::basic_string<T>& string);
static void _makeASCII(string_type& string);
// Conversion to other data types
static BOOL convertToBOOL(const std::basic_string<T>& string, BOOL& value);
static BOOL convertToU8(const std::basic_string<T>& string, U8& value);
static BOOL convertToS8(const std::basic_string<T>& string, S8& value);
static BOOL convertToS16(const std::basic_string<T>& string, S16& value);
static BOOL convertToU16(const std::basic_string<T>& string, U16& value);
static BOOL convertToU32(const std::basic_string<T>& string, U32& value);
static BOOL convertToS32(const std::basic_string<T>& string, S32& value);
static BOOL convertToF32(const std::basic_string<T>& string, F32& value);
static BOOL convertToF64(const std::basic_string<T>& string, F64& value);
static BOOL convertToBOOL(const string_type& string, BOOL& value);
static BOOL convertToU8(const string_type& string, U8& value);
static BOOL convertToS8(const string_type& string, S8& value);
static BOOL convertToS16(const string_type& string, S16& value);
static BOOL convertToU16(const string_type& string, U16& value);
static BOOL convertToU32(const string_type& string, U32& value);
static BOOL convertToS32(const string_type& string, S32& value);
static BOOL convertToF32(const string_type& string, F32& value);
static BOOL convertToF64(const string_type& string, F64& value);
/////////////////////////////////////////////////////////////////////////////////////////
// Utility functions for working with char*'s and strings
@@ -336,24 +386,24 @@ public:
// Like strcmp but also handles empty strings. Uses
// current locale.
static S32 compareStrings(const T* lhs, const T* rhs);
static S32 compareStrings(const std::basic_string<T>& lhs, const std::basic_string<T>& rhs);
static S32 compareStrings(const string_type& lhs, const string_type& rhs);
// case insensitive version of above. Uses current locale on
// Win32, and falls back to a non-locale aware comparison on
// Linux.
static S32 compareInsensitive(const T* lhs, const T* rhs);
static S32 compareInsensitive(const std::basic_string<T>& lhs, const std::basic_string<T>& rhs);
static S32 compareInsensitive(const string_type& lhs, const string_type& rhs);
// Case sensitive comparison with good handling of numbers. Does not use current locale.
// a.k.a. strdictcmp()
static S32 compareDict(const std::basic_string<T>& a, const std::basic_string<T>& b);
static S32 compareDict(const string_type& a, const string_type& b);
// Case *in*sensitive comparison with good handling of numbers. Does not use current locale.
// a.k.a. strdictcmp()
static S32 compareDictInsensitive(const std::basic_string<T>& a, const std::basic_string<T>& b);
static S32 compareDictInsensitive(const string_type& a, const string_type& b);
// Puts compareDict() in a form appropriate for LL container classes to use for sorting.
static BOOL precedesDict( const std::basic_string<T>& a, const std::basic_string<T>& b );
static BOOL precedesDict( const string_type& a, const string_type& b );
// A replacement for strncpy.
// If the dst buffer is dst_size bytes long or more, ensures that dst is null terminated and holds
@@ -361,7 +411,7 @@ public:
static void copy(T* dst, const T* src, size_type dst_size);
// Copies src into dst at a given offset.
static void copyInto(std::basic_string<T>& dst, const std::basic_string<T>& src, size_type offset);
static void copyInto(string_type& dst, const string_type& src, size_type offset);
static bool isPartOfWord(T c) { return (c == (T)'_') || LLStringOps::isAlnum(c); }
@@ -371,7 +421,7 @@ public:
#endif
private:
LL_COMMON_API static size_type getSubstitution(const std::basic_string<T>& instr, size_type& start, std::vector<std::basic_string<T> >& tokens);
LL_COMMON_API static size_type getSubstitution(const string_type& instr, size_type& start, std::vector<string_type >& tokens);
};
template<class T> const std::basic_string<T> LLStringUtilBase<T>::null;
@@ -649,6 +699,321 @@ namespace LLStringFn
////////////////////////////////////////////////////////////
// static
template <class T>
std::vector<typename LLStringUtilBase<T>::string_type>
LLStringUtilBase<T>::getTokens(const string_type& instr, const string_type& delims)
{
std::vector<string_type> tokens;
getTokens(instr, tokens, delims);
return tokens;
}
// static
template <class T>
std::vector<typename LLStringUtilBase<T>::string_type>
LLStringUtilBase<T>::getTokens(const string_type& instr,
const string_type& drop_delims,
const string_type& keep_delims,
const string_type& quotes)
{
std::vector<string_type> tokens;
getTokens(instr, tokens, drop_delims, keep_delims, quotes);
return tokens;
}
// static
template <class T>
std::vector<typename LLStringUtilBase<T>::string_type>
LLStringUtilBase<T>::getTokens(const string_type& instr,
const string_type& drop_delims,
const string_type& keep_delims,
const string_type& quotes,
const string_type& escapes)
{
std::vector<string_type> tokens;
getTokens(instr, tokens, drop_delims, keep_delims, quotes, escapes);
return tokens;
}
namespace LLStringUtilBaseImpl
{
/**
* Input string scanner helper for getTokens(), or really any other
* character-parsing routine that may have to deal with escape characters.
* This implementation defines the concept (also an interface, should you
* choose to implement the concept by subclassing) and provides trivial
* implementations for a string @em without escape processing.
*/
template <class T>
struct InString
{
typedef std::basic_string<T> string_type;
typedef typename string_type::const_iterator const_iterator;
InString(const_iterator b, const_iterator e):
mIter(b),
mEnd(e)
{}
virtual ~InString() {}
bool done() const { return mIter == mEnd; }
/// Is the current character (*mIter) escaped? This implementation can
/// answer trivially because it doesn't support escapes.
virtual bool escaped() const { return false; }
/// Obtain the current character and advance @c mIter.
virtual T next() { return *mIter++; }
/// Does the current character match specified character?
virtual bool is(T ch) const { return (! done()) && *mIter == ch; }
/// Is the current character any one of the specified characters?
virtual bool oneof(const string_type& delims) const
{
return (! done()) && LLStringUtilBase<T>::contains(delims, *mIter);
}
/**
* Scan forward from @from until either @a delim or end. This is primarily
* useful for processing quoted substrings.
*
* If we do see @a delim, append everything from @from until (excluding)
* @a delim to @a into, advance @c mIter to skip @a delim, and return @c
* true.
*
* If we do not see @a delim, do not alter @a into or @c mIter and return
* @c false. Do not pass GO, do not collect $200.
*
* @note The @c false case described above implements normal getTokens()
* treatment of an unmatched open quote: treat the quote character as if
* escaped, that is, simply collect it as part of the current token. Other
* plausible behaviors directly affect the way getTokens() deals with an
* unmatched quote: e.g. throwing an exception to treat it as an error, or
* assuming a close quote beyond end of string (in which case return @c
* true).
*/
virtual bool collect_until(string_type& into, const_iterator from, T delim)
{
const_iterator found = std::find(from, mEnd, delim);
// If we didn't find delim, change nothing, just tell caller.
if (found == mEnd)
return false;
// Found delim! Append everything between from and found.
into.append(from, found);
// advance past delim in input
mIter = found + 1;
return true;
}
const_iterator mIter, mEnd;
};
/// InString subclass that handles escape characters
template <class T>
class InEscString: public InString<T>
{
public:
typedef InString<T> super;
typedef typename super::string_type string_type;
typedef typename super::const_iterator const_iterator;
using super::done;
using super::mIter;
using super::mEnd;
InEscString(const_iterator b, const_iterator e, const string_type& escapes):
super(b, e),
mEscapes(escapes)
{
// Even though we've already initialized 'mIter' via our base-class
// constructor, set it again to check for initial escape char.
setiter(b);
}
/// This implementation uses the answer cached by setiter().
virtual bool escaped() const { return mIsEsc; }
virtual T next()
{
// If we're looking at the escape character of an escape sequence,
// skip that character. This is the one time we can modify 'mIter'
// without using setiter: for this one case we DO NOT CARE if the
// escaped character is itself an escape.
if (mIsEsc)
++mIter;
// If we were looking at an escape character, this is the escaped
// character; otherwise it's just the next character.
T result(*mIter);
// Advance mIter, checking for escape sequence.
setiter(mIter + 1);
return result;
}
virtual bool is(T ch) const
{
// Like base-class is(), except that an escaped character matches
// nothing.
return (! done()) && (! mIsEsc) && *mIter == ch;
}
virtual bool oneof(const string_type& delims) const
{
// Like base-class oneof(), except that an escaped character matches
// nothing.
return (! done()) && (! mIsEsc) && LLStringUtilBase<T>::contains(delims, *mIter);
}
virtual bool collect_until(string_type& into, const_iterator from, T delim)
{
// Deal with escapes in the characters we collect; that is, an escaped
// character must become just that character without the preceding
// escape. Collect characters in a separate string rather than
// directly appending to 'into' in case we do not find delim, in which
// case we're supposed to leave 'into' unmodified.
string_type collected;
// For scanning purposes, we're going to work directly with 'mIter'.
// Save its current value in case we fail to see delim.
const_iterator save_iter(mIter);
// Okay, set 'mIter', checking for escape.
setiter(from);
while (! done())
{
// If we see an unescaped delim, stop and report success.
if ((! mIsEsc) && *mIter == delim)
{
// Append collected chars to 'into'.
into.append(collected);
// Don't forget to advance 'mIter' past delim.
setiter(mIter + 1);
return true;
}
// We're not at end, and either we're not looking at delim or it's
// escaped. Collect this character and keep going.
collected.push_back(next());
}
// Here we hit 'mEnd' without ever seeing delim. Restore mIter and tell
// caller.
setiter(save_iter);
return false;
}
private:
void setiter(const_iterator i)
{
mIter = i;
// Every time we change 'mIter', set 'mIsEsc' to be able to repetitively
// answer escaped() without having to rescan 'mEscapes'. mIsEsc caches
// contains(mEscapes, *mIter).
// We're looking at an escaped char if we're not already at end (that
// is, *mIter is even meaningful); if *mIter is in fact one of the
// specified escape characters; and if there's one more character
// following it. That is, if an escape character is the very last
// character of the input string, it loses its special meaning.
mIsEsc = (! done()) &&
LLStringUtilBase<T>::contains(mEscapes, *mIter) &&
(mIter+1) != mEnd;
}
const string_type mEscapes;
bool mIsEsc;
};
/// getTokens() implementation based on InString concept
template <typename INSTRING, typename string_type>
void getTokens(INSTRING& instr, std::vector<string_type>& tokens,
const string_type& drop_delims, const string_type& keep_delims,
const string_type& quotes)
{
// There are times when we want to match either drop_delims or
// keep_delims. Concatenate them up front to speed things up.
string_type all_delims(drop_delims + keep_delims);
// no tokens yet
tokens.clear();
// try for another token
while (! instr.done())
{
// scan past any drop_delims
while (instr.oneof(drop_delims))
{
// skip this drop_delim
instr.next();
// but if that was the end of the string, done
if (instr.done())
return;
}
// found the start of another token: make a slot for it
tokens.push_back(string_type());
if (instr.oneof(keep_delims))
{
// *iter is a keep_delim, a token of exactly 1 character. Append
// that character to the new token and proceed.
tokens.back().push_back(instr.next());
continue;
}
// Here we have a non-delimiter token, which might consist of a mix of
// quoted and unquoted parts. Use bash rules for quoting: you can
// embed a quoted substring in the midst of an unquoted token (e.g.
// ~/"sub dir"/myfile.txt); you can ram two quoted substrings together
// to make a single token (e.g. 'He said, "'"Don't."'"'). We diverge
// from bash in that bash considers an unmatched quote an error. Our
// param signature doesn't allow for errors, so just pretend it's not
// a quote and embed it.
// At this level, keep scanning until we hit the next delimiter of
// either type (drop_delims or keep_delims).
while (! instr.oneof(all_delims))
{
// If we're looking at an open quote, search forward for
// a close quote, collecting characters along the way.
if (instr.oneof(quotes) &&
instr.collect_until(tokens.back(), instr.mIter+1, *instr.mIter))
{
// collect_until is cleverly designed to do exactly what we
// need here. No further action needed if it returns true.
}
else
{
// Either *iter isn't a quote, or there's no matching close
// quote: in other words, just an ordinary char. Append it to
// current token.
tokens.back().push_back(instr.next());
}
// having scanned that segment of this token, if we've reached the
// end of the string, we're done
if (instr.done())
return;
}
}
}
} // namespace LLStringUtilBaseImpl
// static
template <class T>
void LLStringUtilBase<T>::getTokens(const string_type& string, std::vector<string_type>& tokens,
const string_type& drop_delims, const string_type& keep_delims,
const string_type& quotes)
{
// Because this overload doesn't support escapes, use simple InString to
// manage input range.
LLStringUtilBaseImpl::InString<T> instring(string.begin(), string.end());
LLStringUtilBaseImpl::getTokens(instring, tokens, drop_delims, keep_delims, quotes);
}
// static
template <class T>
void LLStringUtilBase<T>::getTokens(const string_type& string, std::vector<string_type>& tokens,
const string_type& drop_delims, const string_type& keep_delims,
const string_type& quotes, const string_type& escapes)
{
// This overload must deal with escapes. Delegate that to InEscString
// (unless there ARE no escapes).
boost::scoped_ptr< LLStringUtilBaseImpl::InString<T> > instrp;
if (escapes.empty())
instrp.reset(new LLStringUtilBaseImpl::InString<T>(string.begin(), string.end()));
else
instrp.reset(new LLStringUtilBaseImpl::InEscString<T>(string.begin(), string.end(), escapes));
LLStringUtilBaseImpl::getTokens(*instrp, tokens, drop_delims, keep_delims, quotes);
}
// static
template<class T>
@@ -678,7 +1043,7 @@ S32 LLStringUtilBase<T>::compareStrings(const T* lhs, const T* rhs)
//static
template<class T>
S32 LLStringUtilBase<T>::compareStrings(const std::basic_string<T>& lhs, const std::basic_string<T>& rhs)
S32 LLStringUtilBase<T>::compareStrings(const string_type& lhs, const string_type& rhs)
{
return LLStringOps::collate(lhs.c_str(), rhs.c_str());
}
@@ -704,8 +1069,8 @@ S32 LLStringUtilBase<T>::compareInsensitive(const T* lhs, const T* rhs )
}
else
{
std::basic_string<T> lhs_string(lhs);
std::basic_string<T> rhs_string(rhs);
string_type lhs_string(lhs);
string_type rhs_string(rhs);
LLStringUtilBase<T>::toUpper(lhs_string);
LLStringUtilBase<T>::toUpper(rhs_string);
result = LLStringOps::collate(lhs_string.c_str(), rhs_string.c_str());
@@ -715,10 +1080,10 @@ S32 LLStringUtilBase<T>::compareInsensitive(const T* lhs, const T* rhs )
//static
template<class T>
S32 LLStringUtilBase<T>::compareInsensitive(const std::basic_string<T>& lhs, const std::basic_string<T>& rhs)
S32 LLStringUtilBase<T>::compareInsensitive(const string_type& lhs, const string_type& rhs)
{
std::basic_string<T> lhs_string(lhs);
std::basic_string<T> rhs_string(rhs);
string_type lhs_string(lhs);
string_type rhs_string(rhs);
LLStringUtilBase<T>::toUpper(lhs_string);
LLStringUtilBase<T>::toUpper(rhs_string);
return LLStringOps::collate(lhs_string.c_str(), rhs_string.c_str());
@@ -729,7 +1094,7 @@ S32 LLStringUtilBase<T>::compareInsensitive(const std::basic_string<T>& lhs, con
//static
template<class T>
S32 LLStringUtilBase<T>::compareDict(const std::basic_string<T>& astr, const std::basic_string<T>& bstr)
S32 LLStringUtilBase<T>::compareDict(const string_type& astr, const string_type& bstr)
{
const T* a = astr.c_str();
const T* b = bstr.c_str();
@@ -770,7 +1135,7 @@ S32 LLStringUtilBase<T>::compareDict(const std::basic_string<T>& astr, const std
// static
template<class T>
S32 LLStringUtilBase<T>::compareDictInsensitive(const std::basic_string<T>& astr, const std::basic_string<T>& bstr)
S32 LLStringUtilBase<T>::compareDictInsensitive(const string_type& astr, const string_type& bstr)
{
const T* a = astr.c_str();
const T* b = bstr.c_str();
@@ -805,7 +1170,7 @@ S32 LLStringUtilBase<T>::compareDictInsensitive(const std::basic_string<T>& astr
// Puts compareDict() in a form appropriate for LL container classes to use for sorting.
// static
template<class T>
BOOL LLStringUtilBase<T>::precedesDict( const std::basic_string<T>& a, const std::basic_string<T>& b )
BOOL LLStringUtilBase<T>::precedesDict( const string_type& a, const string_type& b )
{
if( a.size() && b.size() )
{
@@ -819,7 +1184,7 @@ BOOL LLStringUtilBase<T>::precedesDict( const std::basic_string<T>& a, const std
//static
template<class T>
void LLStringUtilBase<T>::toUpper(std::basic_string<T>& string)
void LLStringUtilBase<T>::toUpper(string_type& string)
{
if( !string.empty() )
{
@@ -833,7 +1198,7 @@ void LLStringUtilBase<T>::toUpper(std::basic_string<T>& string)
//static
template<class T>
void LLStringUtilBase<T>::toLower(std::basic_string<T>& string)
void LLStringUtilBase<T>::toLower(string_type& string)
{
if( !string.empty() )
{
@@ -847,7 +1212,7 @@ void LLStringUtilBase<T>::toLower(std::basic_string<T>& string)
//static
template<class T>
void LLStringUtilBase<T>::trimHead(std::basic_string<T>& string)
void LLStringUtilBase<T>::trimHead(string_type& string)
{
if( !string.empty() )
{
@@ -862,7 +1227,7 @@ void LLStringUtilBase<T>::trimHead(std::basic_string<T>& string)
//static
template<class T>
void LLStringUtilBase<T>::trimTail(std::basic_string<T>& string)
void LLStringUtilBase<T>::trimTail(string_type& string)
{
if( string.size() )
{
@@ -881,7 +1246,7 @@ void LLStringUtilBase<T>::trimTail(std::basic_string<T>& string)
// Replace line feeds with carriage return-line feed pairs.
//static
template<class T>
void LLStringUtilBase<T>::addCRLF(std::basic_string<T>& string)
void LLStringUtilBase<T>::addCRLF(string_type& string)
{
const T LF = 10;
const T CR = 13;
@@ -923,7 +1288,7 @@ void LLStringUtilBase<T>::addCRLF(std::basic_string<T>& string)
// Remove all carriage returns
//static
template<class T>
void LLStringUtilBase<T>::removeCRLF(std::basic_string<T>& string)
void LLStringUtilBase<T>::removeCRLF(string_type& string)
{
const T CR = 13;
@@ -944,10 +1309,10 @@ void LLStringUtilBase<T>::removeCRLF(std::basic_string<T>& string)
//static
template<class T>
void LLStringUtilBase<T>::replaceChar( std::basic_string<T>& string, T target, T replacement )
void LLStringUtilBase<T>::replaceChar( string_type& string, T target, T replacement )
{
size_type found_pos = 0;
while( (found_pos = string.find(target, found_pos)) != std::basic_string<T>::npos )
while( (found_pos = string.find(target, found_pos)) != string_type::npos )
{
string[found_pos] = replacement;
found_pos++; // avoid infinite defeat if target == replacement
@@ -956,10 +1321,10 @@ void LLStringUtilBase<T>::replaceChar( std::basic_string<T>& string, T target, T
//static
template<class T>
void LLStringUtilBase<T>::replaceString( std::basic_string<T>& string, std::basic_string<T> target, std::basic_string<T> replacement )
void LLStringUtilBase<T>::replaceString( string_type& string, string_type target, string_type replacement )
{
size_type found_pos = 0;
while( (found_pos = string.find(target, found_pos)) != std::basic_string<T>::npos )
while( (found_pos = string.find(target, found_pos)) != string_type::npos )
{
string.replace( found_pos, target.length(), replacement );
found_pos += replacement.length(); // avoid infinite defeat if replacement contains target
@@ -968,7 +1333,7 @@ void LLStringUtilBase<T>::replaceString( std::basic_string<T>& string, std::basi
//static
template<class T>
void LLStringUtilBase<T>::replaceNonstandardASCII( std::basic_string<T>& string, T replacement )
void LLStringUtilBase<T>::replaceNonstandardASCII( string_type& string, T replacement )
{
const char LF = 10;
const S8 MIN = 32;
@@ -988,12 +1353,12 @@ void LLStringUtilBase<T>::replaceNonstandardASCII( std::basic_string<T>& string,
//static
template<class T>
void LLStringUtilBase<T>::replaceTabsWithSpaces( std::basic_string<T>& str, size_type spaces_per_tab )
void LLStringUtilBase<T>::replaceTabsWithSpaces( string_type& str, size_type spaces_per_tab )
{
const T TAB = '\t';
const T SPACE = ' ';
std::basic_string<T> out_str;
string_type out_str;
// Replace tabs with spaces
for (size_type i = 0; i < str.length(); i++)
{
@@ -1012,7 +1377,7 @@ void LLStringUtilBase<T>::replaceTabsWithSpaces( std::basic_string<T>& str, size
//static
template<class T>
BOOL LLStringUtilBase<T>::containsNonprintable(const std::basic_string<T>& string)
BOOL LLStringUtilBase<T>::containsNonprintable(const string_type& string)
{
const char MIN = 32;
BOOL rv = FALSE;
@@ -1029,7 +1394,7 @@ BOOL LLStringUtilBase<T>::containsNonprintable(const std::basic_string<T>& strin
//static
template<class T>
void LLStringUtilBase<T>::stripNonprintable(std::basic_string<T>& string)
void LLStringUtilBase<T>::stripNonprintable(string_type& string)
{
const char MIN = 32;
size_type j = 0;
@@ -1060,8 +1425,43 @@ void LLStringUtilBase<T>::stripNonprintable(std::basic_string<T>& string)
delete []c_string;
}
template<class T>
std::basic_string<T> LLStringUtilBase<T>::quote(const string_type& str,
const string_type& triggers,
const string_type& escape)
{
size_type len(str.length());
// If the string is already quoted, assume user knows what s/he's doing.
if (len >= 2 && str[0] == '"' && str[len-1] == '"')
{
return str;
}
// Not already quoted: do we need to? triggers.empty() is a special case
// meaning "always quote."
if ((! triggers.empty()) && str.find_first_of(triggers) == string_type::npos)
{
// no trigger characters, don't bother quoting
return str;
}
// For whatever reason, we must quote this string.
string_type result;
result.push_back('"');
for (typename string_type::const_iterator ci(str.begin()), cend(str.end()); ci != cend; ++ci)
{
if (*ci == '"')
{
result.append(escape);
}
result.push_back(*ci);
}
result.push_back('"');
return result;
}
template<class T>
void LLStringUtilBase<T>::_makeASCII(std::basic_string<T>& string)
void LLStringUtilBase<T>::_makeASCII(string_type& string)
{
// Replace non-ASCII chars with LL_UNKNOWN_CHAR
for (size_type i = 0; i < string.length(); i++)
@@ -1091,7 +1491,7 @@ void LLStringUtilBase<T>::copy( T* dst, const T* src, size_type dst_size )
// static
template<class T>
void LLStringUtilBase<T>::copyInto(std::basic_string<T>& dst, const std::basic_string<T>& src, size_type offset)
void LLStringUtilBase<T>::copyInto(string_type& dst, const string_type& src, size_type offset)
{
if ( offset == dst.length() )
{
@@ -1101,7 +1501,7 @@ void LLStringUtilBase<T>::copyInto(std::basic_string<T>& dst, const std::basic_s
}
else
{
std::basic_string<T> tail = dst.substr(offset);
string_type tail = dst.substr(offset);
dst = dst.substr(0, offset);
dst += src;
@@ -1112,7 +1512,7 @@ void LLStringUtilBase<T>::copyInto(std::basic_string<T>& dst, const std::basic_s
// True if this is the head of s.
//static
template<class T>
BOOL LLStringUtilBase<T>::isHead( const std::basic_string<T>& string, const T* s )
BOOL LLStringUtilBase<T>::isHead( const string_type& string, const T* s )
{
if( string.empty() )
{
@@ -1128,8 +1528,8 @@ BOOL LLStringUtilBase<T>::isHead( const std::basic_string<T>& string, const T* s
// static
template<class T>
bool LLStringUtilBase<T>::startsWith(
const std::basic_string<T>& string,
const std::basic_string<T>& substr)
const string_type& string,
const string_type& substr)
{
if(string.empty() || (substr.empty())) return false;
if(0 == string.find(substr)) return true;
@@ -1139,8 +1539,8 @@ bool LLStringUtilBase<T>::startsWith(
// static
template<class T>
bool LLStringUtilBase<T>::endsWith(
const std::basic_string<T>& string,
const std::basic_string<T>& substr)
const string_type& string,
const string_type& substr)
{
if(string.empty() || (substr.empty())) return false;
std::string::size_type idx = string.rfind(substr);
@@ -1150,14 +1550,14 @@ bool LLStringUtilBase<T>::endsWith(
template<class T>
BOOL LLStringUtilBase<T>::convertToBOOL(const std::basic_string<T>& string, BOOL& value)
BOOL LLStringUtilBase<T>::convertToBOOL(const string_type& string, BOOL& value)
{
if( string.empty() )
{
return FALSE;
}
std::basic_string<T> temp( string );
string_type temp( string );
trim(temp);
if(
(temp == "1") ||
@@ -1187,7 +1587,7 @@ BOOL LLStringUtilBase<T>::convertToBOOL(const std::basic_string<T>& string, BOOL
}
template<class T>
BOOL LLStringUtilBase<T>::convertToU8(const std::basic_string<T>& string, U8& value)
BOOL LLStringUtilBase<T>::convertToU8(const string_type& string, U8& value)
{
S32 value32 = 0;
BOOL success = convertToS32(string, value32);
@@ -1200,7 +1600,7 @@ BOOL LLStringUtilBase<T>::convertToU8(const std::basic_string<T>& string, U8& va
}
template<class T>
BOOL LLStringUtilBase<T>::convertToS8(const std::basic_string<T>& string, S8& value)
BOOL LLStringUtilBase<T>::convertToS8(const string_type& string, S8& value)
{
S32 value32 = 0;
BOOL success = convertToS32(string, value32);
@@ -1213,7 +1613,7 @@ BOOL LLStringUtilBase<T>::convertToS8(const std::basic_string<T>& string, S8& va
}
template<class T>
BOOL LLStringUtilBase<T>::convertToS16(const std::basic_string<T>& string, S16& value)
BOOL LLStringUtilBase<T>::convertToS16(const string_type& string, S16& value)
{
S32 value32 = 0;
BOOL success = convertToS32(string, value32);
@@ -1226,7 +1626,7 @@ BOOL LLStringUtilBase<T>::convertToS16(const std::basic_string<T>& string, S16&
}
template<class T>
BOOL LLStringUtilBase<T>::convertToU16(const std::basic_string<T>& string, U16& value)
BOOL LLStringUtilBase<T>::convertToU16(const string_type& string, U16& value)
{
S32 value32 = 0;
BOOL success = convertToS32(string, value32);
@@ -1239,17 +1639,17 @@ BOOL LLStringUtilBase<T>::convertToU16(const std::basic_string<T>& string, U16&
}
template<class T>
BOOL LLStringUtilBase<T>::convertToU32(const std::basic_string<T>& string, U32& value)
BOOL LLStringUtilBase<T>::convertToU32(const string_type& string, U32& value)
{
if( string.empty() )
{
return FALSE;
}
std::basic_string<T> temp( string );
string_type temp( string );
trim(temp);
U32 v;
std::basic_istringstream<T> i_stream((std::basic_string<T>)temp);
std::basic_istringstream<T> i_stream((string_type)temp);
if(i_stream >> v)
{
value = v;
@@ -1259,17 +1659,17 @@ BOOL LLStringUtilBase<T>::convertToU32(const std::basic_string<T>& string, U32&
}
template<class T>
BOOL LLStringUtilBase<T>::convertToS32(const std::basic_string<T>& string, S32& value)
BOOL LLStringUtilBase<T>::convertToS32(const string_type& string, S32& value)
{
if( string.empty() )
{
return FALSE;
}
std::basic_string<T> temp( string );
string_type temp( string );
trim(temp);
S32 v;
std::basic_istringstream<T> i_stream((std::basic_string<T>)temp);
std::basic_istringstream<T> i_stream((string_type)temp);
if(i_stream >> v)
{
//TODO: figure out overflow and underflow reporting here
@@ -1286,7 +1686,7 @@ BOOL LLStringUtilBase<T>::convertToS32(const std::basic_string<T>& string, S32&
}
template<class T>
BOOL LLStringUtilBase<T>::convertToF32(const std::basic_string<T>& string, F32& value)
BOOL LLStringUtilBase<T>::convertToF32(const string_type& string, F32& value)
{
F64 value64 = 0.0;
BOOL success = convertToF64(string, value64);
@@ -1299,17 +1699,17 @@ BOOL LLStringUtilBase<T>::convertToF32(const std::basic_string<T>& string, F32&
}
template<class T>
BOOL LLStringUtilBase<T>::convertToF64(const std::basic_string<T>& string, F64& value)
BOOL LLStringUtilBase<T>::convertToF64(const string_type& string, F64& value)
{
if( string.empty() )
{
return FALSE;
}
std::basic_string<T> temp( string );
string_type temp( string );
trim(temp);
F64 v;
std::basic_istringstream<T> i_stream((std::basic_string<T>)temp);
std::basic_istringstream<T> i_stream((string_type)temp);
if(i_stream >> v)
{
//TODO: figure out overflow and underflow reporting here
@@ -1326,7 +1726,7 @@ BOOL LLStringUtilBase<T>::convertToF64(const std::basic_string<T>& string, F64&
}
template<class T>
void LLStringUtilBase<T>::truncate(std::basic_string<T>& string, size_type count)
void LLStringUtilBase<T>::truncate(string_type& string, size_type count)
{
size_type cur_size = string.size();
string.resize(count < cur_size ? count : cur_size);

View File

@@ -460,7 +460,7 @@ typedef struct _ASTAT_
}ASTAT, * PASTAT;
// static
S32 LLUUID::getNodeID(unsigned char * node_id)
S32 LLUUID::getNodeID(unsigned char *node_id)
{
ASTAT Adapter;
NCB Ncb;

View File

@@ -34,7 +34,6 @@
#include <iostream>
#include <set>
#include <vector>
#include "stdtypes.h"
#include "llpreprocessor.h"

View File

@@ -1700,6 +1700,6 @@ LLPointer<LLInventoryCategory> ll_create_category_from_sd(const LLSD& sd_cat)
LLAssetType::lookup(sd_cat[INV_ASSET_TYPE_LABEL].asString()));
rv->setPreferredType(
LLFolderType::lookup(
sd_cat[INV_PREFERRED_TYPE_LABEL].asString()));
sd_cat[INV_PREFERRED_TYPE_LABEL].asString()));
return rv;
}

View File

@@ -148,7 +148,7 @@ DEFAULT_ASSET_FOR_INV_TYPE[LLAssetType::AT_COUNT] =
LLInventoryType::IT_NONE, // 46 AT_NONE
LLInventoryType::IT_NONE, // 47 AT_NONE
LLInventoryType::IT_NONE, // 48 AT_NONE
LLInventoryType::IT_MESH // 49 AT_MESH
LLInventoryType::IT_MESH // 49 AT_MESH
};
// static

View File

@@ -51,7 +51,7 @@ const S32 PARCEL_UNIT_AREA = 16;
const F32 PARCEL_HEIGHT = 50.f;
//Height above ground which parcel boundries exist for explicitly banned avatars
const F32 BAN_HEIGHT = 768.f;
const F32 BAN_HEIGHT = 5000.f;
// Maximum number of entries in an access list
const S32 PARCEL_MAX_ACCESS_LIST = 300;
@@ -260,7 +260,7 @@ public:
void setMediaURLResetTimer(F32 time);
virtual void setLocalID(S32 local_id);
// blow away all the extra crap lurking in parcels, including urls, access lists, etc
// blow away all the extra stuff lurking in parcels, including urls, access lists, etc
void clearParcel();
// This value is not persisted out to the parcel file, it is only
@@ -686,6 +686,7 @@ public:
std::map<LLUUID,LLAccessEntry> mBanList;
std::map<LLUUID,LLAccessEntry> mTempBanList;
std::map<LLUUID,LLAccessEntry> mTempAccessList;
};

View File

@@ -32,9 +32,6 @@
#ifndef LL_LLPERMISSIONSFLAGS_H
#define LL_LLPERMISSIONSFLAGS_H
// llpermissionsflags.h
// Copyright 2002, Linden Research, Inc.
//
// Flags for various permissions bits.
// Shared between viewer and simulator.

View File

@@ -38,7 +38,7 @@
#include "lltransactiontypes.h"
#include "../newview/hippogridmanager.h"
const U8 TRANSACTION_FLAGS_NONE = 0;
const U8 TRANSACTION_FLAG_SOURCE_GROUP = 1;
const U8 TRANSACTION_FLAG_DEST_GROUP = 2;

View File

@@ -74,6 +74,7 @@ const S32 TRANS_CLASSIFIED_RENEW = 2005;
// automatically end up in the list below :-(
// So make sure you check the transaction_description table
const S32 TRANS_RECURRING_GENERIC = 2100;
// Codes 3000-3999 reserved for inventory transactions
const S32 TRANS_GIVE_INVENTORY = 3000;

View File

@@ -28,7 +28,6 @@
#include "linden_common.h"
#include "llbuffer.h"
#include <iterator>
#include "llmath.h"
#include "llmemtype.h"

View File

@@ -29,7 +29,6 @@
#include "lldispatcher.h"
#include <algorithm>
#include <iterator>
#include "llstl.h"
#include "message.h"

View File

@@ -80,7 +80,6 @@
#include "llbuffer.h"
#include "llbufferstream.h"
#include "llfasttimer.h"
#include "llmemorystream.h"
#include "llsd.h"
#include "llsdserialize.h"

View File

@@ -158,7 +158,7 @@ namespace
if(fstream.is_open())
{
fstream.seekg(0, std::ios::end);
U32 fileSize = fstream.tellg();
U32 fileSize = (U32)fstream.tellg();
fstream.seekg(0, std::ios::beg);
std::vector<char> fileBuffer(fileSize);
fstream.read(&fileBuffer[0], fileSize);

View File

@@ -33,7 +33,6 @@
#include "llapr.h"
#include "llbuffer.h"
#include "llbufferstream.h"
#include "llfasttimer.h"
#include "llhttpnode.h"
#include "lliopipe.h"
#include "lliosocket.h"

View File

@@ -32,7 +32,6 @@
#include "llapr.h"
#include "llbuffer.h"
#include "llfasttimer.h"
#include "llhost.h"
#include "llmemtype.h"
#include "llpumpio.h"

View File

@@ -27,7 +27,6 @@
*/
#include "linden_common.h"
#include "llfasttimer.h"
#include "llioutil.h"
/**

View File

@@ -17,6 +17,7 @@ include_directories(
set(llprimitive_SOURCE_FILES
llmaterialtable.cpp
llmediaentry.cpp
llmodel.cpp
llprimitive.cpp
llprimtexturelist.cpp

View File

@@ -137,6 +137,7 @@ void LLMaterialTable::initTableTransNames(std::map<std::string, std::string> nam
infop->mName = namemap[name];
}
}
void LLMaterialTable::initBasicTable()
{
// *TODO: Translate

View File

@@ -0,0 +1,596 @@
/**
* @file llmediaentry.cpp
* @brief This is a single instance of media data related to the face of a prim
*
* $LicenseInfo:firstyear=2001&license=viewerlgpl$
* Second Life Viewer Source Code
* Copyright (C) 2010, Linden Research, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation;
* version 2.1 of the License only.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
#include "linden_common.h"
#include "llmediaentry.h"
#include "lllslconstants.h"
#include <boost/regex.hpp>
// LLSD key defines
// DO NOT REORDER OR REMOVE THESE!
// Some LLSD keys. Do not change!
#define MEDIA_ALT_IMAGE_ENABLE_KEY_STR "alt_image_enable"
#define MEDIA_CONTROLS_KEY_STR "controls"
#define MEDIA_CURRENT_URL_KEY_STR "current_url"
#define MEDIA_HOME_URL_KEY_STR "home_url"
#define MEDIA_AUTO_LOOP_KEY_STR "auto_loop"
#define MEDIA_AUTO_PLAY_KEY_STR "auto_play"
#define MEDIA_AUTO_SCALE_KEY_STR "auto_scale"
#define MEDIA_AUTO_ZOOM_KEY_STR "auto_zoom"
#define MEDIA_FIRST_CLICK_INTERACT_KEY_STR "first_click_interact"
#define MEDIA_WIDTH_PIXELS_KEY_STR "width_pixels"
#define MEDIA_HEIGHT_PIXELS_KEY_STR "height_pixels"
// "security" fields
#define MEDIA_WHITELIST_ENABLE_KEY_STR "whitelist_enable"
#define MEDIA_WHITELIST_KEY_STR "whitelist"
// "permissions" fields
#define MEDIA_PERMS_INTERACT_KEY_STR "perms_interact"
#define MEDIA_PERMS_CONTROL_KEY_STR "perms_control"
// "general" fields
const char* LLMediaEntry::ALT_IMAGE_ENABLE_KEY = MEDIA_ALT_IMAGE_ENABLE_KEY_STR;
const char* LLMediaEntry::CONTROLS_KEY = MEDIA_CONTROLS_KEY_STR;
const char* LLMediaEntry::CURRENT_URL_KEY = MEDIA_CURRENT_URL_KEY_STR;
const char* LLMediaEntry::HOME_URL_KEY = MEDIA_HOME_URL_KEY_STR;
const char* LLMediaEntry::AUTO_LOOP_KEY = MEDIA_AUTO_LOOP_KEY_STR;
const char* LLMediaEntry::AUTO_PLAY_KEY = MEDIA_AUTO_PLAY_KEY_STR;
const char* LLMediaEntry::AUTO_SCALE_KEY = MEDIA_AUTO_SCALE_KEY_STR;
const char* LLMediaEntry::AUTO_ZOOM_KEY = MEDIA_AUTO_ZOOM_KEY_STR;
const char* LLMediaEntry::FIRST_CLICK_INTERACT_KEY = MEDIA_FIRST_CLICK_INTERACT_KEY_STR;
const char* LLMediaEntry::WIDTH_PIXELS_KEY = MEDIA_WIDTH_PIXELS_KEY_STR;
const char* LLMediaEntry::HEIGHT_PIXELS_KEY = MEDIA_HEIGHT_PIXELS_KEY_STR;
// "security" fields
const char* LLMediaEntry::WHITELIST_ENABLE_KEY = MEDIA_WHITELIST_ENABLE_KEY_STR;
const char* LLMediaEntry::WHITELIST_KEY = MEDIA_WHITELIST_KEY_STR;
// "permissions" fields
const char* LLMediaEntry::PERMS_INTERACT_KEY = MEDIA_PERMS_INTERACT_KEY_STR;
const char* LLMediaEntry::PERMS_CONTROL_KEY = MEDIA_PERMS_CONTROL_KEY_STR;
#define DEFAULT_URL_PREFIX "http://"
// Constructor(s)
LLMediaEntry::LLMediaEntry() :
mAltImageEnable(false),
mControls(STANDARD),
mCurrentURL(""),
mHomeURL(""),
mAutoLoop(false),
mAutoPlay(false),
mAutoScale(false),
mAutoZoom(false),
mFirstClickInteract(false),
mWidthPixels(0),
mHeightPixels(0),
mWhiteListEnable(false),
// mWhiteList
mPermsInteract(PERM_ALL),
mPermsControl(PERM_ALL),
mMediaIDp(NULL)
{
}
LLMediaEntry::LLMediaEntry(const LLMediaEntry &rhs) :
mMediaIDp(NULL)
{
// "general" fields
mAltImageEnable = rhs.mAltImageEnable;
mControls = rhs.mControls;
mCurrentURL = rhs.mCurrentURL;
mHomeURL = rhs.mHomeURL;
mAutoLoop = rhs.mAutoLoop;
mAutoPlay = rhs.mAutoPlay;
mAutoScale = rhs.mAutoScale;
mAutoZoom = rhs.mAutoZoom;
mFirstClickInteract = rhs.mFirstClickInteract;
mWidthPixels = rhs.mWidthPixels;
mHeightPixels = rhs.mHeightPixels;
// "security" fields
mWhiteListEnable = rhs.mWhiteListEnable;
mWhiteList = rhs.mWhiteList;
// "permissions" fields
mPermsInteract = rhs.mPermsInteract;
mPermsControl = rhs.mPermsControl;
}
LLMediaEntry::~LLMediaEntry()
{
if (NULL != mMediaIDp)
{
delete mMediaIDp;
}
}
LLSD LLMediaEntry::asLLSD() const
{
LLSD sd;
asLLSD(sd);
return sd;
}
//
// LLSD functions
//
void LLMediaEntry::asLLSD(LLSD& sd) const
{
// "general" fields
sd[ALT_IMAGE_ENABLE_KEY] = mAltImageEnable;
sd[CONTROLS_KEY] = (LLSD::Integer)mControls;
sd[CURRENT_URL_KEY] = mCurrentURL;
sd[HOME_URL_KEY] = mHomeURL;
sd[AUTO_LOOP_KEY] = mAutoLoop;
sd[AUTO_PLAY_KEY] = mAutoPlay;
sd[AUTO_SCALE_KEY] = mAutoScale;
sd[AUTO_ZOOM_KEY] = mAutoZoom;
sd[FIRST_CLICK_INTERACT_KEY] = mFirstClickInteract;
sd[WIDTH_PIXELS_KEY] = mWidthPixels;
sd[HEIGHT_PIXELS_KEY] = mHeightPixels;
// "security" fields
sd[WHITELIST_ENABLE_KEY] = mWhiteListEnable;
sd.erase(WHITELIST_KEY);
for (U32 i=0; i<mWhiteList.size(); i++)
{
sd[WHITELIST_KEY].append(mWhiteList[i]);
}
// "permissions" fields
sd[PERMS_INTERACT_KEY] = mPermsInteract;
sd[PERMS_CONTROL_KEY] = mPermsControl;
}
// static
bool LLMediaEntry::checkLLSD(const LLSD& sd)
{
if (sd.isUndefined()) return true;
LLMediaEntry temp;
return temp.fromLLSDInternal(sd, true);
}
void LLMediaEntry::fromLLSD(const LLSD& sd)
{
(void)fromLLSDInternal(sd, true);
}
void LLMediaEntry::mergeFromLLSD(const LLSD& sd)
{
(void)fromLLSDInternal(sd, false);
}
// *NOTE: returns true if NO failures to set occurred, false otherwise.
// However, be aware that if a failure to set does occur, it does
// not stop setting fields from the LLSD!
bool LLMediaEntry::fromLLSDInternal(const LLSD& sd, bool overwrite)
{
// *HACK: we sort of cheat here and assume that status is a
// bit field. We "or" into status and instead of returning
// it, we return whether it finishes off as LSL_STATUS_OK or not.
U32 status = LSL_STATUS_OK;
// "general" fields
if ( overwrite || sd.has(ALT_IMAGE_ENABLE_KEY) )
{
status |= setAltImageEnable( sd[ALT_IMAGE_ENABLE_KEY] );
}
if ( overwrite || sd.has(CONTROLS_KEY) )
{
status |= setControls( (MediaControls)(LLSD::Integer)sd[CONTROLS_KEY] );
}
if ( overwrite || sd.has(CURRENT_URL_KEY) )
{
// Don't check whitelist
status |= setCurrentURLInternal( sd[CURRENT_URL_KEY], false );
}
if ( overwrite || sd.has(HOME_URL_KEY) )
{
status |= setHomeURL( sd[HOME_URL_KEY] );
}
if ( overwrite || sd.has(AUTO_LOOP_KEY) )
{
status |= setAutoLoop( sd[AUTO_LOOP_KEY] );
}
if ( overwrite || sd.has(AUTO_PLAY_KEY) )
{
status |= setAutoPlay( sd[AUTO_PLAY_KEY] );
}
if ( overwrite || sd.has(AUTO_SCALE_KEY) )
{
status |= setAutoScale( sd[AUTO_SCALE_KEY] );
}
if ( overwrite || sd.has(AUTO_ZOOM_KEY) )
{
status |= setAutoZoom( sd[AUTO_ZOOM_KEY] );
}
if ( overwrite || sd.has(FIRST_CLICK_INTERACT_KEY) )
{
status |= setFirstClickInteract( sd[FIRST_CLICK_INTERACT_KEY] );
}
if ( overwrite || sd.has(WIDTH_PIXELS_KEY) )
{
status |= setWidthPixels( (LLSD::Integer)sd[WIDTH_PIXELS_KEY] );
}
if ( overwrite || sd.has(HEIGHT_PIXELS_KEY) )
{
status |= setHeightPixels( (LLSD::Integer)sd[HEIGHT_PIXELS_KEY] );
}
// "security" fields
if ( overwrite || sd.has(WHITELIST_ENABLE_KEY) )
{
status |= setWhiteListEnable( sd[WHITELIST_ENABLE_KEY] );
}
if ( overwrite || sd.has(WHITELIST_KEY) )
{
status |= setWhiteList( sd[WHITELIST_KEY] );
}
// "permissions" fields
if ( overwrite || sd.has(PERMS_INTERACT_KEY) )
{
status |= setPermsInteract( 0xff & (LLSD::Integer)sd[PERMS_INTERACT_KEY] );
}
if ( overwrite || sd.has(PERMS_CONTROL_KEY) )
{
status |= setPermsControl( 0xff & (LLSD::Integer)sd[PERMS_CONTROL_KEY] );
}
return LSL_STATUS_OK == status;
}
LLMediaEntry& LLMediaEntry::operator=(const LLMediaEntry &rhs)
{
if (this != &rhs)
{
// "general" fields
mAltImageEnable = rhs.mAltImageEnable;
mControls = rhs.mControls;
mCurrentURL = rhs.mCurrentURL;
mHomeURL = rhs.mHomeURL;
mAutoLoop = rhs.mAutoLoop;
mAutoPlay = rhs.mAutoPlay;
mAutoScale = rhs.mAutoScale;
mAutoZoom = rhs.mAutoZoom;
mFirstClickInteract = rhs.mFirstClickInteract;
mWidthPixels = rhs.mWidthPixels;
mHeightPixels = rhs.mHeightPixels;
// "security" fields
mWhiteListEnable = rhs.mWhiteListEnable;
mWhiteList = rhs.mWhiteList;
// "permissions" fields
mPermsInteract = rhs.mPermsInteract;
mPermsControl = rhs.mPermsControl;
}
return *this;
}
bool LLMediaEntry::operator==(const LLMediaEntry &rhs) const
{
return (
// "general" fields
mAltImageEnable == rhs.mAltImageEnable &&
mControls == rhs.mControls &&
mCurrentURL == rhs.mCurrentURL &&
mHomeURL == rhs.mHomeURL &&
mAutoLoop == rhs.mAutoLoop &&
mAutoPlay == rhs.mAutoPlay &&
mAutoScale == rhs.mAutoScale &&
mAutoZoom == rhs.mAutoZoom &&
mFirstClickInteract == rhs.mFirstClickInteract &&
mWidthPixels == rhs.mWidthPixels &&
mHeightPixels == rhs.mHeightPixels &&
// "security" fields
mWhiteListEnable == rhs.mWhiteListEnable &&
mWhiteList == rhs.mWhiteList &&
// "permissions" fields
mPermsInteract == rhs.mPermsInteract &&
mPermsControl == rhs.mPermsControl
);
}
bool LLMediaEntry::operator!=(const LLMediaEntry &rhs) const
{
return (
// "general" fields
mAltImageEnable != rhs.mAltImageEnable ||
mControls != rhs.mControls ||
mCurrentURL != rhs.mCurrentURL ||
mHomeURL != rhs.mHomeURL ||
mAutoLoop != rhs.mAutoLoop ||
mAutoPlay != rhs.mAutoPlay ||
mAutoScale != rhs.mAutoScale ||
mAutoZoom != rhs.mAutoZoom ||
mFirstClickInteract != rhs.mFirstClickInteract ||
mWidthPixels != rhs.mWidthPixels ||
mHeightPixels != rhs.mHeightPixels ||
// "security" fields
mWhiteListEnable != rhs.mWhiteListEnable ||
mWhiteList != rhs.mWhiteList ||
// "permissions" fields
mPermsInteract != rhs.mPermsInteract ||
mPermsControl != rhs.mPermsControl
);
}
U32 LLMediaEntry::setWhiteList( const std::vector<std::string> &whitelist )
{
// *NOTE: This code is VERY similar to the setWhitelist below.
// IF YOU CHANGE THIS IMPLEMENTATION, BE SURE TO CHANGE THE OTHER!
U32 size = 0;
U32 count = 0;
// First count to make sure the size constraint is not violated
std::vector<std::string>::const_iterator iter = whitelist.begin();
std::vector<std::string>::const_iterator end = whitelist.end();
for ( ; iter < end; ++iter)
{
const std::string &entry = (*iter);
size += entry.length() + 1; // Include one for \0
count ++;
if (size > MAX_WHITELIST_SIZE || count > MAX_WHITELIST_COUNT)
{
return LSL_STATUS_BOUNDS_ERROR;
}
}
// Next clear the vector
mWhiteList.clear();
// Then re-iterate and copy entries
iter = whitelist.begin();
for ( ; iter < end; ++iter)
{
const std::string &entry = (*iter);
mWhiteList.push_back(entry);
}
return LSL_STATUS_OK;
}
U32 LLMediaEntry::setWhiteList( const LLSD &whitelist )
{
// If whitelist is undef, the whitelist is cleared
if (whitelist.isUndefined())
{
mWhiteList.clear();
return LSL_STATUS_OK;
}
// However, if the whitelist is an empty array, erase it.
if (whitelist.isArray())
{
// *NOTE: This code is VERY similar to the setWhitelist above.
// IF YOU CHANGE THIS IMPLEMENTATION, BE SURE TO CHANGE THE OTHER!
U32 size = 0;
U32 count = 0;
// First check to make sure the size and count constraints are not violated
LLSD::array_const_iterator iter = whitelist.beginArray();
LLSD::array_const_iterator end = whitelist.endArray();
for ( ; iter < end; ++iter)
{
const std::string &entry = (*iter).asString();
size += entry.length() + 1; // Include one for \0
count ++;
if (size > MAX_WHITELIST_SIZE || count > MAX_WHITELIST_COUNT)
{
return LSL_STATUS_BOUNDS_ERROR;
}
}
// Next clear the vector
mWhiteList.clear();
// Then re-iterate and copy entries
iter = whitelist.beginArray();
for ( ; iter < end; ++iter)
{
const std::string &entry = (*iter).asString();
mWhiteList.push_back(entry);
}
return LSL_STATUS_OK;
}
else
{
return LSL_STATUS_MALFORMED_PARAMS;
}
}
static void prefix_with(std::string &str, const char *chars, const char *prefix)
{
// Given string 'str', prefix all instances of any character in 'chars'
// with 'prefix'
size_t found = str.find_first_of(chars);
size_t prefix_len = strlen(prefix);
while (found != std::string::npos)
{
str.insert(found, prefix, prefix_len);
found = str.find_first_of(chars, found+prefix_len+1);
}
}
static bool pattern_match(const std::string &candidate_str, const std::string &pattern)
{
// If the pattern is empty, it matches
if (pattern.empty()) return true;
// 'pattern' is a glob pattern, we only accept '*' chars
// copy it
std::string expression = pattern;
// Escape perl's regexp chars with a backslash, except all "*" chars
prefix_with(expression, ".[{()\\+?|^$", "\\");
prefix_with(expression, "*", ".");
// case-insensitive matching:
boost::regex regexp(expression, boost::regex::perl|boost::regex::icase);
return boost::regex_match(candidate_str, regexp);
}
bool LLMediaEntry::checkCandidateUrl(const std::string& url) const
{
if (getWhiteListEnable())
{
return checkUrlAgainstWhitelist(url, getWhiteList());
}
else
{
return true;
}
}
// static
bool LLMediaEntry::checkUrlAgainstWhitelist(const std::string& url,
const std::vector<std::string> &whitelist)
{
bool passes = true;
// *NOTE: no entries? Don't check
if (whitelist.size() > 0)
{
passes = false;
// Case insensitive: the reason why we toUpper both this and the
// filter
std::string candidate_url = url;
// Use lluri to see if there is a path part in the candidate URL. No path? Assume "/"
LLURI candidate_uri(candidate_url);
std::vector<std::string>::const_iterator iter = whitelist.begin();
std::vector<std::string>::const_iterator end = whitelist.end();
for ( ; iter < end; ++iter )
{
std::string filter = *iter;
LLURI filter_uri(filter);
bool scheme_passes = pattern_match( candidate_uri.scheme(), filter_uri.scheme() );
if (filter_uri.scheme().empty())
{
filter_uri = LLURI(DEFAULT_URL_PREFIX + filter);
}
bool authority_passes = pattern_match( candidate_uri.authority(), filter_uri.authority() );
bool path_passes = pattern_match( candidate_uri.escapedPath(), filter_uri.escapedPath() );
if (scheme_passes && authority_passes && path_passes)
{
passes = true;
break;
}
}
}
return passes;
}
U32 LLMediaEntry::setStringFieldWithLimit( std::string &field, const std::string &value, U32 limit )
{
if ( value.length() > limit )
{
return LSL_STATUS_BOUNDS_ERROR;
}
else
{
field = value;
return LSL_STATUS_OK;
}
}
U32 LLMediaEntry::setControls(LLMediaEntry::MediaControls controls)
{
if (controls == STANDARD ||
controls == MINI)
{
mControls = controls;
return LSL_STATUS_OK;
}
return LSL_STATUS_BOUNDS_ERROR;
}
U32 LLMediaEntry::setPermsInteract( U8 val )
{
mPermsInteract = val & PERM_MASK;
return LSL_STATUS_OK;
}
U32 LLMediaEntry::setPermsControl( U8 val )
{
mPermsControl = val & PERM_MASK;
return LSL_STATUS_OK;
}
U32 LLMediaEntry::setCurrentURL(const std::string& current_url)
{
return setCurrentURLInternal( current_url, true );
}
U32 LLMediaEntry::setCurrentURLInternal(const std::string& current_url, bool check_whitelist)
{
if ( ! check_whitelist || checkCandidateUrl(current_url))
{
return setStringFieldWithLimit( mCurrentURL, current_url, MAX_URL_LENGTH );
}
else
{
return LSL_STATUS_WHITELIST_FAILED;
}
}
U32 LLMediaEntry::setHomeURL(const std::string& home_url)
{
return setStringFieldWithLimit( mHomeURL, home_url, MAX_URL_LENGTH );
}
U32 LLMediaEntry::setWidthPixels(U16 width)
{
if (width > MAX_WIDTH_PIXELS) return LSL_STATUS_BOUNDS_ERROR;
mWidthPixels = width;
return LSL_STATUS_OK;
}
U32 LLMediaEntry::setHeightPixels(U16 height)
{
if (height > MAX_HEIGHT_PIXELS) return LSL_STATUS_BOUNDS_ERROR;
mHeightPixels = height;
return LSL_STATUS_OK;
}
const LLUUID &LLMediaEntry::getMediaID() const
{
// Lazily generate media ID
if (NULL == mMediaIDp)
{
mMediaIDp = new LLUUID();
mMediaIDp->generate();
}
return *mMediaIDp;
}

View File

@@ -83,7 +83,6 @@ LLModel::~LLModel()
bool get_dom_sources(const domInputLocalOffset_Array& inputs, S32& pos_offset, S32& tc_offset, S32& norm_offset, S32 &idx_stride,
domSource* &pos_source, domSource* &tc_source, domSource* &norm_source)
{
idx_stride = 0;
for (U32 j = 0; j < inputs.getCount(); ++j)
@@ -209,7 +208,6 @@ LLModel::EModelStatus load_face_from_dom_triangles(std::vector<LLVolumeFace>& fa
n[idx[i+norm_offset]*3+1],
n[idx[i+norm_offset]*3+2]));
}
BOOL found = FALSE;
@@ -276,7 +274,6 @@ LLModel::EModelStatus load_face_from_dom_triangles(std::vector<LLVolumeFace>& fa
face = LLVolumeFace();
point_map.clear();
}
}
if (!verts.empty())
@@ -509,7 +506,7 @@ LLModel::EModelStatus load_face_from_dom_polylist(std::vector<LLVolumeFace>& fac
{
material = std::string(poly->getMaterial());
}
materials.push_back(material);
face_list.push_back(face);
face_list.rbegin()->fillFromLegacyData(verts, indices);
@@ -539,7 +536,6 @@ LLModel::EModelStatus load_face_from_dom_polygons(std::vector<LLVolumeFace>& fac
const domInputLocalOffset_Array& inputs = poly->getInput_array();
S32 v_offset = -1;
S32 n_offset = -1;
S32 t_offset = -1;
@@ -651,8 +647,7 @@ LLModel::EModelStatus load_face_from_dom_polygons(std::vector<LLVolumeFace>& fac
vert.mTexCoord.setVec(t->get(t_idx),
t->get(t_idx+1));
}
verts.push_back(vert);
}
}
@@ -1467,7 +1462,6 @@ LLSD LLModel::writeModel(
}
}
LLVector2 tc_range = max_tc - min_tc;
for (U32 j = 0; j < (U32)face.mNumVertices; ++j)
@@ -1983,6 +1977,7 @@ bool LLModel::matchMaterialOrder(LLModel* ref, int& refFaceCnt, int& modelFaceCn
//build a map of material slot names to face indexes
bool reorder = false;
std::set<std::string> base_mat;
std::set<std::string> cur_mat;

View File

@@ -230,7 +230,7 @@ void audio_update_wind(bool force_update)
//
if (force_update || (last_camera_water_height * camera_water_height) < 0.f)
{
static const LLCachedControl<F32> audio_level_rolloff("AudioLevelRolloff",1);
static const LLCachedControl<F32> audio_level_rolloff("AudioLevelRolloff", 1.0f);
if (camera_water_height < 0.f)
{
gAudiop->setRolloffFactor(audio_level_rolloff * LL_ROLLOFF_MULTIPLIER_UNDER_WATER);
@@ -241,17 +241,18 @@ void audio_update_wind(bool force_update)
}
}
// Scale down the contribution of weather-simulation wind to the
// ambient wind noise. Wind velocity averages 3.5 m/s, with gusts to 7 m/s
// whereas steady-state avatar walk velocity is only 3.2 m/s.
// Without this the world feels desolate on first login when you are
// standing still.
static LLCachedControl<F32> wind_level("AudioLevelWind", 0.5f);
LLVector3 scaled_wind_vec = gWindVec * wind_level;
// Scale down the contribution of weather-simulation wind to the
// ambient wind noise. Wind velocity averages 3.5 m/s, with gusts to 7 m/s
// whereas steady-state avatar walk velocity is only 3.2 m/s.
// Without this the world feels desolate on first login when you are
// standing still.
static LLCachedControl<F32> wind_level("AudioLevelWind", 0.5f);
LLVector3 scaled_wind_vec = gWindVec * wind_level;
// Mix in the avatar's motion, subtract because when you walk north,
// the apparent wind moves south.
LLVector3 final_wind_vec = scaled_wind_vec - gAgent.getVelocity();
// Mix in the avatar's motion, subtract because when you walk north,
// the apparent wind moves south.
LLVector3 final_wind_vec = scaled_wind_vec - gAgent.getVelocity();
// rotate the wind vector to be listener (agent) relative
gRelativeWindVec = gAgent.getFrameAgent().rotateToLocal(final_wind_vec);
@@ -275,7 +276,7 @@ void audio_update_wind(bool force_update)
if (gSavedSettings.getBOOL("MuteWind"))
{
// volume decreases by itself
gAudiop->mMaxWindGain -= gAudiop->mMaxWindGain;
gAudiop->mMaxWindGain = 0.f;
}
// mute wind when not /*flying*/ in air
else if /*(gAgent.getFlying())*/ (gAgentAvatarp && gAgentAvatarp->mInAir)

View File

@@ -43,7 +43,7 @@
#include "llavatarnamecache.h"
#include "indra_constants.h"
#include "lscript_byteformat.h"
#include "mean_collision_data.h"
#include "llfloaterbump.h"
#include "llassetstorage.h"
#include "llcachename.h"
@@ -61,7 +61,10 @@
#include "llteleportflags.h"
#include "lltracker.h"
#include "lltransactionflags.h"
#include "llvfile.h"
#include "llvfs.h"
#include "llxfermanager.h"
#include "mean_collision_data.h"
#include "message.h"
#include "sound_ids.h"
#include "lleventtimer.h"

View File

@@ -72,6 +72,8 @@
#include "lldeleteutils.h"
#include "imageids.h"
#include "indra_constants.h"
#include "llinitparam.h"
//#include "linden_common.h"
//#include "llpreprocessor.h"
#include "llapp.h"
@@ -103,7 +105,6 @@
#include "llthread.h"
#include "lltimer.h"
#include "lluuidhashmap.h"
//#include "llversionviewer.h"
//#include "processor.h"
#include "stdenums.h"
#include "stdtypes.h"
@@ -112,27 +113,13 @@
#include "timing.h"
#include "u64.h"
// Library includes from llimage
//#include "llblockdata.h"
//#include "llimage.h"
//#include "llimagebmp.h"
//#include "llimagepng.h"
//#include "llimagej2c.h"
//#include "llimagejpeg.h"
//#include "llimagetga.h"
//#include "llmapimagetype.h"
// Library includes from llmath project
//#include "camera.h"
//#include "coordframe.h"
#include "llmath.h"
#include "llbboxlocal.h"
#include "llcamera.h"
#include "llcoord.h"
#include "llcoordframe.h"
#include "llcrc.h"
#include "llinterp.h"
#include "llperlin.h"
#include "llplane.h"
#include "llquantize.h"
#include "llrand.h"
@@ -141,7 +128,6 @@
#include "m3math.h"
#include "m4math.h"
#include "llquaternion.h"
#include "raytrace.h"
#include "v2math.h"
#include "v3color.h"
#include "v3dmath.h"
@@ -149,11 +135,9 @@
#include "v4color.h"
#include "v4coloru.h"
#include "v4math.h"
////#include "vmath.h"
#include "xform.h"
// Library includes from llmessage project
//#include "llassetstorage.h"
#include "llcachename.h"
#include "llcircuit.h"
#include "lldatapacker.h"
@@ -163,16 +147,12 @@
#include "llhost.h"
#include "llinstantmessage.h"
#include "llinvite.h"
//#include "llloginflags.h"
//#include "llmail.h"
#include "llmessagethrottle.h"
#include "llnamevalue.h"
#include "llpacketack.h"
#include "llpacketbuffer.h"
#include "llpacketring.h"
#include "llpartdata.h"
//#include "llqueryflags.h"
//#include "llregionflags.h"
#include "llregionhandle.h"
#include "lltaskname.h"
#include "llteleportflags.h"

View File

@@ -31,6 +31,8 @@
*/
#include "llviewerprecompiledheaders.h"
#include "llviewerwindow.h"
// system library includes
#include <stdio.h>
@@ -42,7 +44,7 @@
#include "llmeshrepository.h"
#include "llpanellogin.h"
#include "llviewerkeyboard.h"
#include "llviewerwindow.h"
#include "llviewquery.h"
#include "llxmltree.h"
@@ -75,6 +77,7 @@
#include "lltimer.h"
#include "timing.h"
#include "llviewermenu.h"
#include "raytrace.h"
// newview includes
#include "llagent.h"

View File

@@ -40,6 +40,7 @@
#include "llaudioengine.h"
#include "noise.h"
#include "llsdserialize.h"
#include "raytrace.h"
#include "llagent.h" // Get state values from here
#include "llagentcamera.h"