Fixes, mainly for Clang/Mac, from Cinder.

This commit is contained in:
Inusaito Sayori
2014-03-24 16:56:10 -04:00
parent 924011f36e
commit 5affacab70
19 changed files with 80 additions and 38 deletions

View File

@@ -317,7 +317,7 @@ namespace HACD
bool m_addFacesPoints; //>! specifies whether to add faces points or not
bool m_addExtraDistPoints; //>! specifies whether to add extra points for concave shapes or not
friend HACD * const CreateHACD(HeapManager * heapManager = 0);
friend HACD * const CreateHACD(HeapManager * heapManager);
friend void DestroyHACD(HACD * const hacd);
};
inline HACD * const CreateHACD(HeapManager * heapManager)

View File

@@ -24,7 +24,7 @@
*/
#ifndef LL_LLAUDIODECODEMGR_H
#define LL_LLAUDIODECODEMG_H
#define LL_LLAUDIODECODEMGR_H
#include "stdtypes.h"

View File

@@ -117,6 +117,7 @@ set(llcommon_HEADER_FILES
bitpack.h
ctype_workaround.h
doublelinkedlist.h
fix_macros.h
imageids.h
indra_constants.h
linden_common.h

View File

@@ -0,0 +1,25 @@
/**
* @file fix_macros.h
* @author Nat Goodspeed
* @date 2012-11-16
* @brief The Mac system headers seem to #define macros with obnoxiously
* generic names, preventing any library from using those names. We've
* had to fix these in so many places that it's worth making a header
* file to handle it.
*
* $LicenseInfo:firstyear=2012&license=viewerlgpl$
* Copyright (c) 2012, Linden Research, Inc.
* $/LicenseInfo$
*/
// DON'T use an #include guard: every time we encounter this header, #undef
// these macros all over again.
// who injects MACROS with such generic names?! Grr.
#ifdef equivalent
#undef equivalent
#endif
#ifdef check
#undef check
#endif

View File

@@ -30,6 +30,7 @@
#include "llmessagethrottle.h"
#include "llframetimer.h"
#include "fix_macros.h"
// This is used for the stl search_n function.
#if _MSC_VER >= 1500 // VC9 has a bug in search_n

View File

@@ -1503,14 +1503,13 @@ LLNotificationPtr LLNotifications::add(AIAlert::Error const& error, int type, un
}
//--------------------------------------------------------------------------------
// class UpdateItem
// struct UpdateItem
//
// Allow LLNotifications::add, LLNotifications::cancel and LLNotifications::update
// to be called from any thread.
class UpdateItem
struct UpdateItem
{
public:
char const* sigtype;
LLNotificationPtr pNotif;
UpdateItem(char const* st, LLNotificationPtr const& np) : sigtype(st), pNotif(np) { }

View File

@@ -197,7 +197,7 @@ class LLNotification :
{
LOG_CLASS(LLNotification);
friend class LLNotifications;
friend class UpdateItem;
friend struct UpdateItem;
public:
// parameter object used to instantiate a new notification
@@ -568,7 +568,7 @@ class LLNotificationChannelBase :
public boost::signals2::trackable
{
LOG_CLASS(LLNotificationChannelBase);
friend class UpdateItem;
friend struct UpdateItem;
public:
LLNotificationChannelBase(LLNotificationFilter filter, LLNotificationComparator comp) :
mFilter(filter), mItems_sf(comp)

View File

@@ -1518,7 +1518,7 @@ if (WINDOWS)
COMMAND ${PYTHON_EXECUTABLE}
ARGS
${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py
--arch=${ARCH}
--arch=${ARCH}
--artwork=${ARTWORK_DIR}
--branding_id=${VIEWER_BRANDING_ID}
--build=${CMAKE_CURRENT_BINARY_DIR}
@@ -1540,7 +1540,7 @@ if (WINDOWS)
COMMAND ${PYTHON_EXECUTABLE}
ARGS
${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py
--arch=${ARCH}
--arch=${ARCH}
--artwork=${ARTWORK_DIR}
--actions=copy
--branding_id=${VIEWER_BRANDING_ID}

View File

@@ -573,7 +573,7 @@
<key>CheckForGridUpdates</key>
<map>
<key>Comment</key>
<string>Fetch list of grids from Hippo server</string>
<string>Fetch list of grids from location set in GridUpdateList</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
@@ -592,6 +592,17 @@
<key>Value</key>
<string>Second Life</string>
</map>
<key>GridUpdateList</key>
<map>
<key>Comment</key>
<string>URL to fetch Grid updates from</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>String</string>
<key>Value</key>
<string/>
</map>
<key>VivoxLicenseAccepted</key>
<map>

View File

@@ -891,6 +891,8 @@ void HippoGridManager::loadFromFile()
void HippoGridManager::parseUrl(const std::string url, bool mergeIfNewer)
{
if (url.empty()) return;
llinfos << "Loading grid info from '" << url << "'." << llendl;
// query update server

View File

@@ -2076,7 +2076,7 @@ void LLAgentCamera::handleScrollWheel(S32 clicks)
if (MASK mask = gKeyboard->currentMask(true)) // Singu Note: Conveniently set view offsets while modifier keys are held during scroll
{
static const LLCachedControl<bool> enableCameraOffsetScroll("SinguOffsetScrollKeys");
if (mask & MASK_CONTROL|MASK_SHIFT && enableCameraOffsetScroll)
if (mask & (MASK_CONTROL|MASK_SHIFT) && enableCameraOffsetScroll)
{
const F32 change(static_cast<F32>(clicks) * 0.1f);
if (mask & MASK_SHIFT)

View File

@@ -3030,7 +3030,7 @@ void LLAppearanceMgr::removeCOFItemLinks(const LLUUID& item_id)
const LLViewerInventoryItem* item = item_array.get(i).get();
if (item->getIsLinkType() && item->getLinkedUUID() == item_id)
{
#if LL_RELEASE_WITH_DEBUG_INFO || LL_DEBUG
#if 0 // LL_RELEASE_WITH_DEBUG_INFO || LL_DEBUG
// NOTE-RLVa: debug-only, can be removed down the line
if (rlv_handler_t::isEnabled())
{
@@ -3062,7 +3062,7 @@ void LLAppearanceMgr::removeCOFLinksOfType(LLWearableType::EType type)
if (item->getIsLinkType()) // we must operate on links only
{
// [RLVa:KB] - Checked: 2013-02-12 (RLVa-1.4.8)
#if LL_RELEASE_WITH_DEBUG_INFO || LL_DEBUG
#if 0 // LL_RELEASE_WITH_DEBUG_INFO || LL_DEBUG
// NOTE-RLVa: debug-only, can be removed down the line
if (rlv_handler_t::isEnabled())
{

View File

@@ -304,6 +304,8 @@ const std::string MARKER_FILE_NAME("Singularity.exec_marker");
const std::string ERROR_MARKER_FILE_NAME("Singularity.error_marker");
const std::string LLERROR_MARKER_FILE_NAME("Singularity.llerror_marker");
const std::string LOGOUT_MARKER_FILE_NAME("Singularity.logout_marker");
const std::string LOG_FILE("Singularity.log");
extern const std::string OLD_LOG_FILE("Singularity.old");
static BOOL gDoDisconnect = FALSE;
static std::string gLaunchFileOnQuit;
@@ -1946,13 +1948,11 @@ bool LLAppViewer::initLogging()
LLError::setFatalFunction(errorCallback);
// Remove the last ".old" log file.
std::string old_log_file = gDirUtilp->getExpandedFilename(LL_PATH_LOGS,
"Singularity.old");
std::string old_log_file = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, OLD_LOG_FILE);
LLFile::remove(old_log_file);
// Rename current log file to ".old"
std::string log_file = gDirUtilp->getExpandedFilename(LL_PATH_LOGS,
"Singularity.log");
std::string log_file = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, LOG_FILE);
LLFile::rename(log_file, old_log_file);
// Set the log file to Singularity.log
@@ -2664,7 +2664,7 @@ void LLAppViewer::writeSystemInfo()
// that the crash report will go to the proper location in the case of a
// prior freeze.
std::string crashHostUrl = gSavedSettings.get<std::string>("CrashHostUrl");
if(crashHostUrl != "")
if (!crashHostUrl.empty())
{
gDebugInfo["CrashHostUrl"] = crashHostUrl;
}
@@ -2725,7 +2725,7 @@ void LLAppViewer::handleViewerCrash()
// Insert crash host url (url to post crash log to) if configured.
std::string crashHostUrl = gSavedSettings.get<std::string>("CrashHostUrl");
if(crashHostUrl != "")
if (!crashHostUrl.empty())
{
gDebugInfo["Dynamic"]["CrashHostUrl"] = crashHostUrl;
}

View File

@@ -47,6 +47,7 @@
class AIHTTPTimeoutPolicy;
extern AIHTTPTimeoutPolicy crashLoggerResponder_timeout;
extern const std::string OLD_LOG_FILE;
class LLCrashLoggerResponder : public LLHTTPClient::ResponderWithResult
{
@@ -284,7 +285,7 @@ void LLCrashLogger::gatherFiles()
mCrashInfo["DebugLog"] = mDebugLog;
mFileMap["StatsLog"] = gDirUtilp->getExpandedFilename(LL_PATH_DUMP,"stats.log");
// Singu Note: we have just started again, log has been renamed
mFileMap["SecondLifeLog"] = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, "Singularity.old");
mFileMap["SecondLifeLog"] = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, OLD_LOG_FILE);
llinfos << "Encoding files..." << llendl;
@@ -395,6 +396,8 @@ void LLCrashLogger::checkCrashDump()
if (pref == 2) return; //never send
mCrashHost = gSavedSettings.getString("CrashHostUrl");
// Don't send if there's no crash host. :O
if (mCrashHost.empty()) return;
std::string dumpDir = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, "") + "singularity-debug";
// Do we have something to send, and somewhere to send it

View File

@@ -442,12 +442,12 @@ LLFloaterIMPanel::~LLFloaterIMPanel()
// virtual
void LLFloaterIMPanel::changed(U32 mask)
{
if (mask & REMOVE|ADD) // Fix remove/add friend choices
if (mask & (REMOVE|ADD)) // Fix remove/add friend choices
rebuildDynamics(getChild<LLComboBox>("instant_message_flyout"));
/* Singu TODO: Chat UI - Online icons?
if (mask & ONLINE)
// Show online icon here
else if (mask & NONE)
else
// Show offline icon here
*/
}

View File

@@ -92,7 +92,7 @@ std::ostream& operator<<(std::ostream &s, const LLMediaDataClient::request_queue
std::ostream& operator<<(std::ostream &s, const LLMediaDataClient::Request &q);
template <typename T>
static typename T::iterator find_matching_request(T &c, const LLMediaDataClient::Request *request, LLMediaDataClient::Request::Type match_type)
typename T::iterator find_matching_request(T &c, const LLMediaDataClient::Request *request, LLMediaDataClient::Request::Type match_type)
{
for(typename T::iterator iter = c.begin(); iter != c.end(); ++iter)
{
@@ -106,7 +106,7 @@ static typename T::iterator find_matching_request(T &c, const LLMediaDataClient:
}
template <typename T>
static typename T::iterator find_matching_request(T &c, const LLUUID &id, LLMediaDataClient::Request::Type match_type)
typename T::iterator find_matching_request(T &c, const LLUUID &id, LLMediaDataClient::Request::Type match_type)
{
for(typename T::iterator iter = c.begin(); iter != c.end(); ++iter)
{
@@ -123,7 +123,7 @@ static typename T::iterator find_matching_request(T &c, const LLUUID &id, LLMedi
// to other elements in the container (such as std::vector).
// If the implementation is changed to use a container with this property, this will need to be revisited.
template <typename T>
static void remove_matching_requests(T &c, const LLUUID &id, LLMediaDataClient::Request::Type match_type)
void remove_matching_requests(T &c, const LLUUID &id, LLMediaDataClient::Request::Type match_type)
{
for(typename T::iterator iter = c.begin(); iter != c.end();)
{
@@ -171,10 +171,10 @@ bool LLMediaDataClient::isEmpty() const
bool LLMediaDataClient::isInQueue(const LLMediaDataClientObject::ptr_t &object)
{
if(find_matching_request(mQueue, object->getID()) != mQueue.end())
if(find_matching_request(mQueue, object->getID(), LLMediaDataClient::Request::ANY) != mQueue.end())
return true;
if(find_matching_request(mUnQueuedRequests, object->getID()) != mUnQueuedRequests.end())
if(find_matching_request(mUnQueuedRequests, object->getID(), LLMediaDataClient::Request::ANY) != mUnQueuedRequests.end())
return true;
return false;
@@ -183,8 +183,8 @@ bool LLMediaDataClient::isInQueue(const LLMediaDataClientObject::ptr_t &object)
void LLMediaDataClient::removeFromQueue(const LLMediaDataClientObject::ptr_t &object)
{
LL_DEBUGS("LLMediaDataClient") << "removing requests matching ID " << object->getID() << LL_ENDL;
remove_matching_requests(mQueue, object->getID());
remove_matching_requests(mUnQueuedRequests, object->getID());
remove_matching_requests(mQueue, object->getID(), LLMediaDataClient::Request::ANY);
remove_matching_requests(mUnQueuedRequests, object->getID(), LLMediaDataClient::Request::ANY);
}
void LLMediaDataClient::startQueueTimer()
@@ -776,7 +776,7 @@ bool LLObjectMediaDataClient::isInQueue(const LLMediaDataClientObject::ptr_t &ob
if(LLMediaDataClient::isInQueue(object))
return true;
if(find_matching_request(mRoundRobinQueue, object->getID()) != mRoundRobinQueue.end())
if(find_matching_request(mRoundRobinQueue, object->getID(), LLMediaDataClient::Request::ANY) != mRoundRobinQueue.end())
return true;
return false;
@@ -787,7 +787,7 @@ void LLObjectMediaDataClient::removeFromQueue(const LLMediaDataClientObject::ptr
// First, call parent impl.
LLMediaDataClient::removeFromQueue(object);
remove_matching_requests(mRoundRobinQueue, object->getID());
remove_matching_requests(mRoundRobinQueue, object->getID(), LLMediaDataClient::Request::ANY);
}
bool LLObjectMediaDataClient::processQueueTimer()
@@ -937,7 +937,7 @@ void LLObjectMediaNavigateClient::enqueue(Request *request)
}
// If there's already a matching request in the queue, remove it.
request_queue_t::iterator iter = find_matching_request(mQueue, request);
request_queue_t::iterator iter = find_matching_request(mQueue, request, LLMediaDataClient::Request::ANY);
if(iter != mQueue.end())
{
LL_DEBUGS("LLMediaDataClient") << "removing matching queued request " << (**iter) << LL_ENDL;
@@ -945,7 +945,7 @@ void LLObjectMediaNavigateClient::enqueue(Request *request)
}
else
{
request_set_t::iterator set_iter = find_matching_request(mUnQueuedRequests, request);
request_set_t::iterator set_iter = find_matching_request(mUnQueuedRequests, request, LLMediaDataClient::Request::ANY);
if(set_iter != mUnQueuedRequests.end())
{
LL_DEBUGS("LLMediaDataClient") << "removing matching unqueued request " << (**set_iter) << LL_ENDL;

View File

@@ -282,9 +282,9 @@ private:
bool mQueueTimerIsRunning;
template <typename T> friend typename T::iterator find_matching_request(T &c, const LLMediaDataClient::Request *request, LLMediaDataClient::Request::Type match_type = LLMediaDataClient::Request::ANY);
template <typename T> friend typename T::iterator find_matching_request(T &c, const LLUUID &id, LLMediaDataClient::Request::Type match_type = LLMediaDataClient::Request::ANY);
template <typename T> friend void remove_matching_requests(T &c, const LLUUID &id, LLMediaDataClient::Request::Type match_type = LLMediaDataClient::Request::ANY);
template <typename T> friend typename T::iterator find_matching_request(T &c, const LLMediaDataClient::Request *request, LLMediaDataClient::Request::Type match_type);
template <typename T> friend typename T::iterator find_matching_request(T &c, const LLUUID &id, LLMediaDataClient::Request::Type match_type);
template <typename T> friend void remove_matching_requests(T &c, const LLUUID &id, LLMediaDataClient::Request::Type match_type);
};

View File

@@ -2,7 +2,7 @@
<floater can_close="true" can_drag_on_left="false" can_minimize="true"
can_resize="false" height="440" min_height="100" min_width="100"
name="floater_about" rect_control="FloaterAboutRect"
title="About Singularity Viewer" width="470">
title="About [APP_NAME]" width="470">
<tab_container follows="all" bottom="1" border="false" left="10" height="414" width="450" name="about_tab" tab_position="top">
<panel border="false" height="386" label="Info" help_topic="about_support_tab" name="support_panel">
<text_editor parse_urls="true" follows="top|left" font="SansSerif" top="-1" bg_readonly_color="transparent" left="3" max_length="65536" name="support_editor" bottom="28" width="443" word_wrap="true"/>

View File

@@ -66,7 +66,7 @@ Make sure you entered the correct Login URI. An example of a Login URI is: \"htt
<string name="LoginRetrySeedCapGrant">Requesting region capabilities, attempt [NUMBER]...</string>
<string name="LoginWaitingForRegionHandshake">Waiting for region handshake...</string>
<string name="LoginConnectingToRegion">Connecting to region...</string>
<string name="LoginDownloadingClothing">Downloading clothing...</string>
<string name="LoginDownloadingClothing">Dry cleaning clothing...</string>
<string name="LoginFailed">Login failed.</string>
<string name="Quit">Quit</string>