This commit is contained in:
Liru Færs
2019-10-07 23:59:45 -04:00
18 changed files with 79 additions and 73 deletions

View File

@@ -1157,8 +1157,8 @@ source_group("CMake Rules" FILES ViewerInstall.cmake)
# the summary.json file is created for the benefit of the TeamCity builds, where
# it is used to provide descriptive information to the build results page
add_custom_target(generate_viewer_version ALL
COMMAND cmake -E echo ${VIEWER_SHORT_VERSION}.${VIEWER_VERSION_REVISION} > ${CMAKE_CURRENT_BINARY_DIR}/viewer_version.txt
COMMAND cmake -E echo {"Type":"viewer","Version":"${VIEWER_SHORT_VERSION}.${VIEWER_VERSION_REVISION}"} > ${CMAKE_BINARY_DIR}/summary.json
COMMAND ${CMAKE_COMMAND} -E echo ${VIEWER_SHORT_VERSION}.${VIEWER_VERSION_REVISION} > ${CMAKE_CURRENT_BINARY_DIR}/viewer_version.txt
COMMAND ${CMAKE_COMMAND} -E echo {"Type":"viewer","Version":"${VIEWER_SHORT_VERSION}.${VIEWER_VERSION_REVISION}"} > ${CMAKE_BINARY_DIR}/summary.json
COMMENT "Generating viewer_version.txt for manifest processing"
)
@@ -1342,6 +1342,7 @@ if (WINDOWS)
shell32
user32
Vfw32
wer
Wbemuuid
winspool
Normaliz

View File

@@ -47,7 +47,6 @@
#include <fcntl.h> //_O_APPEND
#include <io.h> //_open_osfhandle()
#include <errorrep.h> // for AddERExcludedApplicationA()
#include <process.h> // _spawnl()
#include <tchar.h> // For TCHAR support
#include <Werapi.h>
@@ -379,34 +378,15 @@ int APIENTRY WinMain(HINSTANCE hInstance,
void LLAppViewerWin32::disableWinErrorReporting()
{
const char win_xp_string[] = "Microsoft Windows XP";
BOOL is_win_xp = ( getOSInfo().getOSString().substr(0, strlen(win_xp_string) ) == win_xp_string ); /* Flawfinder: ignore*/
if( is_win_xp )
std::string const& executable_name = gDirUtilp->getExecutableFilename();
if( S_OK == WerAddExcludedApplication( utf8str_to_utf16str(executable_name).c_str(), FALSE ) )
{
// Note: we need to use run-time dynamic linking, because load-time dynamic linking will fail
// on systems that don't have the library installed (all non-Windows XP systems)
HINSTANCE fault_rep_dll_handle = LoadLibrary(L"faultrep.dll"); /* Flawfinder: ignore */
if( fault_rep_dll_handle )
{
pfn_ADDEREXCLUDEDAPPLICATIONA pAddERExcludedApplicationA = (pfn_ADDEREXCLUDEDAPPLICATIONA) GetProcAddress(fault_rep_dll_handle, "AddERExcludedApplicationA");
if( pAddERExcludedApplicationA )
{
// Strip the path off the name
const char* executable_name = gDirUtilp->getExecutableFilename().c_str();
if( 0 == pAddERExcludedApplicationA( executable_name ) )
{
U32 error_code = GetLastError();
LL_INFOS() << "AddERExcludedApplication() failed with error code " << error_code << LL_ENDL;
}
else
{
LL_INFOS() << "AddERExcludedApplication() success for " << executable_name << LL_ENDL;
}
}
FreeLibrary( fault_rep_dll_handle );
}
LL_INFOS() << "WerAddExcludedApplication() succeeded for " << executable_name << LL_ENDL;
}
else
{
LL_INFOS() << "WerAddExcludedApplication() failed for " << executable_name << LL_ENDL;
}
}
@@ -451,7 +431,7 @@ bool LLAppViewerWin32::init()
{
// Platform specific initialization.
// Turn off Windows XP Error Reporting
// Turn off Windows Error Reporting
// (Don't send our data to Microsoft--at least until we are Logo approved and have a way
// of getting the data back from them.)
//

View File

@@ -796,9 +796,6 @@ static void xform4a(LLVector4a &tex_coord, const LLVector4a& trans, const LLVect
// Texture transforms are done about the center of the face.
st.setAdd(tex_coord, trans);
// Handle rotation
LLVector4a rot_st;
// <s0 * cosAng, s0*-sinAng, s1*cosAng, s1*-sinAng>
LLVector4a s0;
s0.splat(st, 0);
@@ -873,7 +870,6 @@ BOOL LLFace::genVolumeBBoxes(const LLVolume &volume, S32 f,
//VECTORIZE THIS
LLMatrix4a mat_vert = mat_vert_in;
LLVector4a new_extents[2];
llassert(less_than_max_mag(face.mExtents[0]));
llassert(less_than_max_mag(face.mExtents[1]));

View File

@@ -2685,7 +2685,7 @@ void LLMeshRepository::notifyLoadedMeshes()
void LLMeshRepository::notifySkinInfoReceived(LLMeshSkinInfo& info)
{
mSkinMap[info.mMeshID] = info;
mSkinMap.insert_or_assign(info.mMeshID, info);
skin_load_map::iterator iter = mLoadingSkins.find(info.mMeshID);
if (iter != mLoadingSkins.end())
@@ -2792,8 +2792,8 @@ const LLMeshSkinInfo* LLMeshRepository::getSkinInfo(const LLUUID& mesh_id, const
{
if (mesh_id.notNull())
{
skin_map::iterator iter = mSkinMap.find(mesh_id);
if (iter != mSkinMap.end())
const auto iter = mSkinMap.find(mesh_id);
if (iter != mSkinMap.cend())
{
return &(iter->second);
}

View File

@@ -39,6 +39,8 @@
#include "lluploadfloaterobservers.h"
#include "aistatemachinethread.h"
#include <absl/container/node_hash_map.h>
#ifndef BOOST_FUNCTION_HPP_INCLUDED
#include <boost/function.hpp>
#define BOOST_FUNCTION_HPP_INCLUDED
@@ -561,7 +563,7 @@ public:
typedef std::map<LLVolumeParams, std::vector<LLVOVolume*> > mesh_load_map;
mesh_load_map mLoadingMeshes[4];
typedef boost::unordered_map<LLUUID, LLMeshSkinInfo> skin_map;
typedef absl::node_hash_map<LLUUID, LLMeshSkinInfo> skin_map;
skin_map mSkinMap;
typedef std::map<LLUUID, LLModel::Decomposition*> decomposition_map;

View File

@@ -2002,13 +2002,13 @@ LLViewerObject *LLViewerObjectList::createObjectViewer(const LLPCode pcode, LLVi
return NULL;
}
mUUIDObjectMap[fullid] = objectp;
mUUIDObjectMap.insert_or_assign(fullid, objectp);
if(objectp->isAvatar())
{
LLVOAvatar *pAvatar = dynamic_cast<LLVOAvatar*>(objectp);
if(pAvatar)
{
mUUIDAvatarMap[fullid] = pAvatar;
mUUIDAvatarMap.insert_or_assign(fullid, pAvatar);
// <singu>
if (LLFloaterIMPanel* im = find_im_floater(fullid))
im->addDynamicFocus();
@@ -2052,13 +2052,13 @@ LLViewerObject *LLViewerObjectList::createObject(const LLPCode pcode, LLViewerRe
regionp->addToCreatedList(local_id);
}
mUUIDObjectMap[fullid] = objectp;
mUUIDObjectMap.insert_or_assign(fullid, objectp);
if(objectp->isAvatar())
{
LLVOAvatar *pAvatar = dynamic_cast<LLVOAvatar*>(objectp);
if(pAvatar)
{
mUUIDAvatarMap[fullid] = pAvatar;
mUUIDAvatarMap.insert_or_assign(fullid, pAvatar);
// <singu>
if (LLFloaterIMPanel* im = find_im_floater(fullid))
im->addDynamicFocus();

View File

@@ -36,6 +36,8 @@
#include <map>
#include <set>
#include "absl/container/flat_hash_map.h"
// common includes
#include "llstat.h"
#include "llstring.h"
@@ -219,8 +221,8 @@ public:
uuid_set_t mDeadObjects;
boost::unordered_map<LLUUID, LLPointer<LLViewerObject> > mUUIDObjectMap;
boost::unordered_map<LLUUID, LLPointer<LLVOAvatar> > mUUIDAvatarMap;
absl::flat_hash_map<LLUUID, LLPointer<LLViewerObject> > mUUIDObjectMap;
absl::flat_hash_map<LLUUID, LLPointer<LLVOAvatar> > mUUIDAvatarMap;
//set of objects that need to update their cost
uuid_set_t mStaleObjectCost;
@@ -272,8 +274,8 @@ extern LLViewerObjectList gObjectList;
// Inlines
inline LLViewerObject *LLViewerObjectList::findObject(const LLUUID &id) const
{
boost::unordered_map<LLUUID, LLPointer<LLViewerObject> >::const_iterator iter = mUUIDObjectMap.find(id);
if(iter != mUUIDObjectMap.end())
auto iter = mUUIDObjectMap.find(id);
if(iter != mUUIDObjectMap.cend())
{
return iter->second;
}
@@ -285,8 +287,8 @@ inline LLViewerObject *LLViewerObjectList::findObject(const LLUUID &id) const
inline LLVOAvatar *LLViewerObjectList::findAvatar(const LLUUID &id) const
{
boost::unordered_map<LLUUID, LLPointer<LLVOAvatar> >::const_iterator iter = mUUIDAvatarMap.find(id);
return (iter != mUUIDAvatarMap.end()) ? iter->second.get() : NULL;
auto iter = mUUIDAvatarMap.find(id);
return (iter != mUUIDAvatarMap.cend()) ? iter->second.get() : NULL;
}
inline LLViewerObject *LLViewerObjectList::getObject(const S32 index)

View File

@@ -6391,6 +6391,7 @@ LLVOPartGroup* LLPipeline::lineSegmentIntersectParticle(const LLVector4a& start,
LLVector4a local_end = end;
LLVector4a position;
position.clear();
LLDrawable* drawable = NULL;
@@ -6442,6 +6443,7 @@ LLViewerObject* LLPipeline::lineSegmentIntersectInWorld(const LLVector4a& start,
LLVector4a local_end = end;
LLVector4a position;
position.clear();
sPickAvatar = FALSE; //LLToolMgr::getInstance()->inBuildMode() ? FALSE : TRUE;