Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • alchemy/viewer
  • Miezhiko/alchemy-next
  • JennaHuntsman/xdg-integration
  • logue/alchemy-next
  • FelixWolf/alchemy-viewer
  • XenHat/xdg-integration
6 results
Show changes
Commits on Source (61)
Showing
with 33 additions and 221 deletions
......@@ -104,7 +104,6 @@ variables:
when: 'always'
variables:
VIEWER_SIGNING_IDENTITY: $APPLE_SIGNATURE
USE_SENTRY: "FALSE"
before_script:
- python3 -m venv .venv
- source .venv/bin/activate
......@@ -208,7 +207,6 @@ coverity_scan:
extends: .mac_build
variables:
AUTOBUILD_ADDRSIZE: 64
USE_SENTRY: "FALSE"
cache:
key:
prefix: darwin64
......
......@@ -1902,11 +1902,11 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
<key>archive</key>
<map>
<key>hash</key>
<string>666ad5a7dd4bede7745cbe2846e2516b47510720824c57fa976bf8424b4f7745b8adbc209e65410ad0e03d3f78f8146d841fb81bbf23fc05358be11ffef60900</string>
<string>4261f3c8510252c4767c422f309d6f5c462f3069dbe5d943bc72444d6ba56b796ed1c4e3b65c2c6ff12e37379445a6b172226bc56e3557e2bd698bf8d86ec322</string>
<key>hash_algorithm</key>
<string>blake2b</string>
<key>url</key>
<string>https://git.alchemyviewer.org/api/v4/projects/147/packages/generic/openjpeg/2.4.0.2371/openjpeg-2.4.0-darwin64-2371.tar.zst</string>
<string>https://git.alchemyviewer.org/api/v4/projects/105/packages/generic/openjpeg/1.5.1.2451/openjpeg-1.5.1-darwin64-2451.tar.zst</string>
</map>
<key>name</key>
<string>darwin64</string>
......@@ -1916,11 +1916,11 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
<key>archive</key>
<map>
<key>hash</key>
<string>331d224c638d9ee50c519d8714ad48b8e1c7802ee18ff7b64c77c1905d48cee1a4f0d0c1f23c546dc298464817e4fd39a61b066537ea0a1cbcc90f059ae1747f</string>
<string>bfadf99f079161d6f2cef1ce1c4d2623a1aa8f02ba87ff71697af048261d4ea3ca2cbe3e95d627abe985c10bd80edd16b18ef124c7af57246a4ad7887de985d9</string>
<key>hash_algorithm</key>
<string>blake2b</string>
<key>url</key>
<string>https://git.alchemyviewer.org/api/v4/projects/147/packages/generic/openjpeg/2.4.0.2371/openjpeg-2.4.0-linux64-2371.tar.zst</string>
<string>https://git.alchemyviewer.org/api/v4/projects/105/packages/generic/openjpeg/1.5.1.2451/openjpeg-1.5.1-linux64-2451.tar.zst</string>
</map>
<key>name</key>
<string>linux64</string>
......@@ -1930,11 +1930,11 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
<key>archive</key>
<map>
<key>hash</key>
<string>4bc3980bf4bf9b5d933fcca1949bd2890a5fb2e3a22675e524ea6989150a77211e30f3bc81999272f23387f3aefcd2d894dca7f5bea6f79fcb6b8aea6a02ebcb</string>
<string>d10bc74430b0ee657cb9c6bafec81860974547c1890c038e4223b6e50665cf352a0b8c7dd2db81b21c086a15c6a55ba545d087f88dedddf599fd743e515564c9</string>
<key>hash_algorithm</key>
<string>blake2b</string>
<key>url</key>
<string>https://git.alchemyviewer.org/api/v4/projects/147/packages/generic/openjpeg/2.4.0.2371/openjpeg-2.4.0-windows64-2371.tar.zst</string>
<string>https://git.alchemyviewer.org/api/v4/projects/105/packages/generic/openjpeg/1.5.1.2451/openjpeg-1.5.1-windows64-2451.tar.zst</string>
</map>
<key>name</key>
<string>windows64</string>
......@@ -1945,9 +1945,9 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
<key>license_file</key>
<string>LICENSES/openjpeg.txt</string>
<key>copyright</key>
<string>Copyright (c) 2002-2014, Universite catholique de Louvain, Belgium, Copyright (c) 2002-2012, Professor Benoit Macq, Copyright (c) 2003-2012, Antonin Descampe, Copyright (c) 2003-2009, Francois-Olivier Devaux, Copyright (c) 2005, Herve Drolon, FreeImage Team, Copyright (c) 2002-2003, Yannick Verschueren, Copyright (c) 2001-2003, David Janssens</string>
<string>Copyright (c) 2002-2012, Communications and Remote Sensing Laboratory, Universite catholique de Louvain (UCL), Belgium, Copyright (c) 2002-2012, Professor Benoit Macq, Copyright (c) 2003-2012, Antonin Descampe, Copyright (c) 2003-2009, Francois-Olivier Devaux, Copyright (c) 2005, Herve Drolon, FreeImage Team, Copyright (c) 2002-2003, Yannick Verschueren, Copyright (c) 2001-2003, David Janssens</string>
<key>version</key>
<string>2.4.0</string>
<string>1.5.1</string>
<key>name</key>
<string>openjpeg</string>
<key>description</key>
......@@ -2208,11 +2208,11 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
<key>archive</key>
<map>
<key>hash</key>
<string>3078726680748de58c764324dd07038d00ca63a8d3219265932f5ca7e8d61cad130073f0e320ef0ae60fe6fd1b9a7a75e47005038a8e03a1e8ef8621f09e434b</string>
<string>fd47fda26f517e1d4a31e0c84ac05ed8171a5582b7b141c45d7359e834d3b533fac71630a59764a72bd59510136156546e1502430a0beeaeb5b46844fd63e8b1</string>
<key>hash_algorithm</key>
<string>blake2b</string>
<key>url</key>
<string>https://git.alchemyviewer.org/api/v4/projects/185/packages/generic/tinygltf/v2.8.21.2343/tinygltf-v2.8.21-common-2343.tar.zst</string>
<string>https://git.alchemyviewer.org/api/v4/projects/185/packages/generic/tinygltf/v2.8.21.2435/tinygltf-v2.8.21-common-2435.tar.zst</string>
</map>
<key>name</key>
<string>common</string>
......
......@@ -58,12 +58,12 @@ if(WINDOWS)
set(debug_src_dir "${ARCH_PREBUILT_DIRS_DEBUG}")
set(debug_files
openjp2.dll
openjpeg.dll
)
set(release_src_dir "${ARCH_PREBUILT_DIRS_RELEASE}")
set(release_files
openjp2.dll
openjpeg.dll
)
# ICU4C (same filenames for 32 and 64 bit builds)
......
......@@ -9,9 +9,9 @@ use_prebuilt_binary(openjpeg)
if(WINDOWS)
target_link_libraries(ll::openjpeg INTERFACE
debug ${ARCH_PREBUILT_DIRS_DEBUG}/openjp2.lib
optimized ${ARCH_PREBUILT_DIRS_RELEASE}/openjp2.lib)
debug ${ARCH_PREBUILT_DIRS_DEBUG}/openjpeg.lib
optimized ${ARCH_PREBUILT_DIRS_RELEASE}/openjpeg.lib)
else ()
target_link_libraries(ll::openjpeg INTERFACE openjp2 )
target_link_libraries(ll::openjpeg INTERFACE openjpeg )
endif ()
target_include_directories( ll::openjpeg SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include/openjpeg)
target_include_directories( ll::openjpeg SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include/openjpeg-1.5)
......@@ -7,7 +7,7 @@ include(OpenSSL)
include(ZLIBNG)
include_guard()
if (DEFINED ENV{USE_SENTRY} AND NOT DARWIN)
if (DEFINED ENV{USE_SENTRY})
set(USE_SENTRY $ENV{USE_SENTRY} CACHE BOOL "" FORCE)
endif()
......@@ -17,7 +17,7 @@ else()
set(SENTRY_DSN "" CACHE STRING "Sentry DSN")
endif()
if (INSTALL_PROPRIETARY AND NOT SENTRY_DSN STREQUAL "" AND NOT DARWIN)
if (INSTALL_PROPRIETARY AND NOT SENTRY_DSN STREQUAL "")
set(USE_SENTRY ON CACHE BOOL "Use the Sentry crash reporting system")
endif ()
......
......@@ -29,11 +29,6 @@ FetchContent_Declare(
GIT_SHALLOW TRUE
GIT_PROGRESS TRUE
)
# FetchContent_Declare(
# Catch2
# GIT_REPOSITORY https://github.com/catchorg/Catch2.git
# GIT_TAG v2.13.7
# )
FetchContent_Declare(
fmt
GIT_REPOSITORY https://github.com/fmtlib/fmt.git
......@@ -41,13 +36,6 @@ FetchContent_Declare(
GIT_SHALLOW TRUE
GIT_PROGRESS TRUE
)
FetchContent_Declare(
nlohmann_json
GIT_REPOSITORY https://git.alchemyviewer.org/alchemy/mirrors/modernjson.git
GIT_TAG v3.11.3
GIT_SHALLOW TRUE
GIT_PROGRESS TRUE
)
# #Download the rest of the libraries
FetchContent_MakeAvailable(fmt)
......@@ -55,12 +43,6 @@ FetchContent_MakeAvailable(fmt)
set(MESHOPT_BUILD_SHARED_LIBS OFF)
FetchContent_MakeAvailable(meshoptimizer)
# If you only include this third party in PRIVATE source files, you do not
# need to install it when your main project gets installed.
set(JSON_Install OFF CACHE INTERNAL "")
set(JSON_BuildTests OFF CACHE INTERNAL "")
FetchContent_MakeAvailable(nlohmann_json)
if(USE_TRACY)
FetchContent_Declare (
tracy
......
......@@ -448,7 +448,8 @@ using namespace LLAvatarAppearanceDefines;
void LLAvatarAppearance::compareJointStateMaps(joint_state_map_t& last_state,
joint_state_map_t& curr_state)
{
if (!last_state.empty() && (last_state != curr_state))
LL_DEBUGS("AvatarBodySize") << "Comparing Joint State";
if (!last_state.empty() && (last_state != curr_state))
{
S32 diff_count = 0;
for (joint_state_map_t::value_type& pair : last_state)
......@@ -456,16 +457,16 @@ void LLAvatarAppearance::compareJointStateMaps(joint_state_map_t& last_state,
const std::string& key = pair.first;
if (last_state[key] != curr_state[key])
{
LL_DEBUGS("AvatarBodySize") << "BodySize change " << key << " " << last_state[key] << "->" << curr_state[key] << LL_ENDL;
LL_CONT << LL_NEWLINE << "BodySize change " << key << " " << last_state[key] << "->" << curr_state[key];
diff_count++;
}
}
if (diff_count > 0)
{
LL_DEBUGS("AvatarBodySize") << "Total of BodySize changes " << diff_count << LL_ENDL;
LL_CONT << LL_NEWLINE << "Total of BodySize changes " << diff_count;
}
}
LL_CONT << LL_ENDL;
}
//------------------------------------------------------------------------
......@@ -554,9 +555,7 @@ void LLAvatarAppearance::computeBodySize()
{
mBodySize = new_body_size;
#ifdef SHOW_DEBUG
compareJointStateMaps(mLastBodySizeState, mCurrBodySizeState);
#endif
}
}
......@@ -608,13 +607,11 @@ BOOL LLAvatarAppearance::setupBone(const LLAvatarBoneInfo* info, LLJoint* parent
{
LLJoint* joint = NULL;
#ifdef SHOW_DEBUG
LL_DEBUGS("BVH") << "bone info: name " << info->mName
<< " isJoint " << info->mIsJoint
<< " volume_num " << volume_num
<< " joint_num " << joint_num
<< LL_ENDL;
#endif
if (info->mIsJoint)
{
......
......@@ -53,9 +53,7 @@ LLAvatarJoint *getBaseSkeletonAncestor(LLAvatarJoint* joint)
LLJoint *ancestor = joint->getParent();
while (ancestor->getParent() && (ancestor->getSupport() != LLJoint::SUPPORT_BASE))
{
#ifdef SHOW_DEBUG
LL_DEBUGS("Avatar") << "skipping non-base ancestor " << ancestor->getName() << LL_ENDL;
#endif
ancestor = ancestor->getParent();
}
return (LLAvatarJoint*) ancestor;
......@@ -331,9 +329,7 @@ void LLAvatarJointMesh::setMesh( LLPolyMesh *mesh )
if (!mMesh->isLOD())
{
setupJoint((LLAvatarJoint*)getRoot());
#ifdef SHOW_DEBUG
LL_DEBUGS("Avatar") << getName() << " joint render entries: " << mMesh->mJointRenderData.size() << LL_ENDL;
#endif
}
}
......@@ -355,9 +351,7 @@ void LLAvatarJointMesh::setupJoint(LLAvatarJoint* current_joint)
}
// we've found a skinjoint for this joint..
#ifdef SHOW_DEBUG
LL_DEBUGS("Avatar") << "Mesh: " << getName() << " joint " << current_joint->getName() << " matches skinjoint " << sj << LL_ENDL;
#endif
// is the last joint in the array our parent?
......@@ -372,21 +366,15 @@ void LLAvatarJointMesh::setupJoint(LLAvatarJoint* current_joint)
// ...then just add ourselves
LLAvatarJoint* jointp = js.mJoint;
jrd.push_back(new LLJointRenderData(&jointp->getWorldMatrix(), &js));
#ifdef SHOW_DEBUG
LL_DEBUGS("Avatar") << "add joint[" << (jrd.size()-1) << "] = " << js.mJoint->getName() << LL_ENDL;
#endif
}
// otherwise add our ancestor and ourselves
else
{
jrd.push_back(new LLJointRenderData(&ancestor->getWorldMatrix(), NULL));
#ifdef SHOW_DEBUG
LL_DEBUGS("Avatar") << "add2 ancestor joint[" << (jrd.size()-1) << "] = " << ancestor->getName() << LL_ENDL;
#endif
jrd.push_back(new LLJointRenderData(&current_joint->getWorldMatrix(), &js));
#ifdef SHOW_DEBUG
LL_DEBUGS("Avatar") << "add2 joint[" << (jrd.size()-1) << "] = " << current_joint->getName() << LL_ENDL;
#endif
}
}
......
......@@ -302,9 +302,7 @@ BOOL LLPolyMeshSharedData::loadMesh( const std::string& fileName )
BOOL status = FALSE;
if ( strncmp(header, HEADER_BINARY, strlen(HEADER_BINARY)) == 0 ) /*Flawfinder: ignore*/
{
#ifdef SHOW_DEBUG
LL_DEBUGS() << "Loading " << fileName << LL_ENDL;
#endif
//----------------------------------------------------------------
// File Header (seek past it)
......@@ -513,9 +511,7 @@ BOOL LLPolyMeshSharedData::loadMesh( const std::string& fileName )
// Faces
//----------------------------------------------------------------
U32 i;
#ifdef SHOW_DEBUG
U32 numTris = 0;
#endif
for (i = 0; i < numFaces; i++)
{
S16 face[3];
......@@ -564,12 +560,10 @@ BOOL LLPolyMeshSharedData::loadMesh( const std::string& fileName )
#endif
}
#ifdef SHOW_DEBUG
LL_DEBUGS() << "verts: " << numVertices
<< ", faces: " << numFaces
<< ", tris: " << numTris
<< LL_ENDL;
#endif
//----------------------------------------------------------------
// NumSkinJoints
......
......@@ -1289,9 +1289,7 @@ void LLTexLayer::renderMorphMasks(S32 x, S32 y, S32 width, S32 height, const LLC
{
if (!force_render && !hasMorph())
{
#ifdef SHOW_DEBUG
LL_DEBUGS() << "skipping renderMorphMasks for " << getUUID() << LL_ENDL;
#endif
return;
}
LL_PROFILE_ZONE_SCOPED;
......@@ -1323,9 +1321,7 @@ void LLTexLayer::renderMorphMasks(S32 x, S32 y, S32 width, S32 height, const LLC
success &= param->render( x, y, width, height );
if (!success && !force_render)
{
#ifdef SHOW_DEBUG
LL_DEBUGS() << "Failed to render param " << param->getID() << " ; skipping morph mask." << LL_ENDL;
#endif
return;
}
}
......
......@@ -322,9 +322,7 @@ BOOL LLTexLayerParamAlpha::render(S32 x, S32 y, S32 width, S32 height)
mStaticImageRaw = new LLImageRaw;
mStaticImageTGA->decodeAndProcess(mStaticImageRaw, info->mDomain, effective_weight);
mNeedsCreateTexture = TRUE;
#ifdef SHOW_DEBUG
LL_DEBUGS() << "Built Cached Alpha: " << info->mStaticImageFileName << ": (" << mStaticImageRaw->getWidth() << ", " << mStaticImageRaw->getHeight() << ") " << "Domain: " << info->mDomain << " Weight: " << effective_weight << LL_ENDL;
#endif
}
if (mCachedProcessedTexture)
......
......@@ -169,9 +169,7 @@ void LLWearable::createVisualParams(LLAvatarAppearance *avatarp)
{
if( !param->linkDrivenParams(boost::bind(param_function,avatarp,_1 ), true))
{
#ifdef SHOW_DEBUG
LL_DEBUGS("Avatar") << "could not link driven params for wearable " << getName() << " id: " << param->getID() << LL_ENDL;
#endif
continue;
}
}
......
......@@ -490,9 +490,7 @@ bool LLAudioChannelFMODSTUDIO::updateBuffer()
}
else
{
#if SHOW_DEBUG
LL_DEBUGS() << "No source buffer!" << LL_ENDL;
#endif
return false;
}
......
......@@ -350,9 +350,7 @@ LLMotion::LLMotionInitStatus LLKeyframeMotion::onInitialize(LLCharacter *charact
return STATUS_FAILURE;
}
#ifdef SHOW_DEBUG
LL_DEBUGS() << "Loading keyframe data for: " << getName() << ":" << getID() << " (" << anim_file_size << " bytes)" << LL_ENDL;
#endif
LLDataPackerBinaryBuffer dp(anim_data, anim_file_size);
......
......@@ -352,11 +352,9 @@ void LLVisualParam::setParamLocation(EParamLocation loc)
{
// no action
}
#ifdef SHOW_DEBUG
else
{
LL_DEBUGS() << "param location is already " << mParamLocation << ", not slamming to " << loc << LL_ENDL;
}
#endif
}
......@@ -39,7 +39,6 @@ set(llcommon_SOURCE_FILES
llcoros.cpp
llcrc.cpp
llcriticaldamp.cpp
llcurrencywrapper.cpp
lldate.cpp
lldeadmantimer.cpp
lldependencies.cpp
......@@ -150,7 +149,6 @@ set(llcommon_HEADER_FILES
llcoros.h
llcrc.h
llcriticaldamp.h
llcurrencywrapper.h
lldate.h
lldeadmantimer.h
lldefs.h
......@@ -293,7 +291,6 @@ target_link_libraries(
ll::tracy
ll::icu4c
ll::xxhash
nlohmann_json::nlohmann_json
fmt::fmt
)
......@@ -324,8 +321,6 @@ if(USE_PRECOMPILED_HEADERS)
<boost/unordered/unordered_flat_set.hpp>
<boost/unordered/unordered_map.hpp>
<boost/unordered/unordered_set.hpp>
<fmt/format.h>
<fmt/compile.h>
)
endif()
......
/**
* @file llcurrencywrapper.cpp
* @brief Currency wrapping class from the tea viewer helper library
*
* Copyright (C) 2012 arminweatherwax (at) lavabit.com
* Copyright (C) 2015 Cinder Roxley <cinder@sdf.org>
* You can use it under the following license:
*
* Boost Software License - Version 1.0 - August 17th, 2003
*
* Permission is hereby granted, free of charge, to any person or organization
* obtaining a copy of the software and accompanying documentation covered by
* this license (the "Software") to use, reproduce, display, distribute,
* execute, and transmit the Software, and to prepare derivative works of the
* Software, and to permit third-parties to whom the Software is furnished to
* do so, all subject to the following:
*
* The copyright notices in the Software and this entire statement, including
* the above license grant, this restriction and the following disclaimer,
* must be included in all copies of the Software, in whole or in part, and
* all derivative works of the Software, unless such copies or derivative
* works are solely in the form of machine-executable object code generated by
* a source language processor.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
* SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
* FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*/
#include "llcurrencywrapper.h"
#include <boost/algorithm/string.hpp>
void LLCurrencyWrapper::setCurrency(const std::string& currency)
{
mCurrency = currency;
mChangedSignal();
}
void LLCurrencyWrapper::setHomeCurrency(const std::string& currency)
{
mHomeCurrency = currency;
setCurrency(currency);
}
std::string LLCurrencyWrapper::wrapCurrency(const std::string& to_substitute) const
{
return boost::algorithm::replace_all_copy(to_substitute, "L$", mCurrency);
}
void LLCurrencyWrapper::wrapCurrency(std::string& to_substitute) const
{
boost::algorithm::replace_all(to_substitute, "L$", mCurrency);
}
boost::signals2::connection LLCurrencyWrapper::addCurrencyChangedCb(currency_changed_callback_t cb)
{
return mChangedSignal.connect(cb);
}
void LLCurrencyWrapper::removeCurrencyChangedCb(boost::signals2::connection cb)
{
mChangedSignal.disconnect(cb);
}
/**
* @file llcurrencywrapper.h
* @brief Currency wrapping class from the tea viewer helper library
*
* Copyright (C) 2012 arminweatherwax (at) lavabit.com
* Copyright (C) 2015 Cinder Roxley <cinder@sdf.org>
* You can use it under the following license:
*
* Boost Software License - Version 1.0 - August 17th, 2003
*
* Permission is hereby granted, free of charge, to any person or organization
* obtaining a copy of the software and accompanying documentation covered by
* this license (the "Software") to use, reproduce, display, distribute,
* execute, and transmit the Software, and to prepare derivative works of the
* Software, and to permit third-parties to whom the Software is furnished to
* do so, all subject to the following:
*
* The copyright notices in the Software and this entire statement, including
* the above license grant, this restriction and the following disclaimer,
* must be included in all copies of the Software, in whole or in part, and
* all derivative works of the Software, unless such copies or derivative
* works are solely in the form of machine-executable object code generated by
* a source language processor.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
* SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
* FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*/
#ifndef LL_CURRENCYWRAPPER_H
#define LL_CURRENCYWRAPPER_H
#include "llsingleton.h"
#include <string>
#include <boost/signals2.hpp>
class LLCurrencyWrapper final : public LLSingleton<LLCurrencyWrapper>
{
LLSINGLETON_EMPTY_CTOR(LLCurrencyWrapper);
public:
void setCurrency(const std::string& currency);
void setHomeCurrency(const std::string& currency);
const std::string& getCurrency() const { return mCurrency; }
const std::string& getHomeCurrency() const { return mHomeCurrency; }
std::string wrapCurrency(const std::string& to_substitute) const;
void wrapCurrency(std::string& to_substitute) const;
using currency_changed_signal_t = boost::signals2::signal<void()>;
using currency_changed_callback_t = std::function<void()>;
boost::signals2::connection addCurrencyChangedCb(currency_changed_callback_t cb);
void removeCurrencyChangedCb(boost::signals2::connection cb);
private:
std::string mCurrency;
std::string mHomeCurrency;
currency_changed_signal_t mChangedSignal;
};
#endif //LL_CURRENCYWRAPPER_H
......@@ -46,8 +46,6 @@ const int LL_ERR_NOERR = 0;
// #define RELEASE_SHOW_DEBUG // Define this if you want your release builds to show lldebug output.
#define RELEASE_SHOW_INFO // Define this if you want your release builds to show llinfo output
#define RELEASE_SHOW_WARN // Define this if you want your release builds to show llwarn output.
#define ENABLE_DEBUG_MACRO 1
#ifdef _DEBUG
#define SHOW_DEBUG
......@@ -58,6 +56,8 @@ const int LL_ERR_NOERR = 0;
#ifdef LL_RELEASE_WITH_DEBUG_INFO
#define SHOW_ASSERT
#define SHOW_DEBUG
#define ENABLE_DEBUG_MACRO
#endif // LL_RELEASE_WITH_DEBUG_INFO
#ifdef RELEASE_SHOW_DEBUG
......@@ -402,7 +402,7 @@ typedef LLError::NoClassInfo _LL_CLASS_TO_LOG;
std::ostringstream _out; \
_out
#if ENABLE_DEBUG_MACRO
#ifdef ENABLE_DEBUG_MACRO
#define lllog_debug(level, once, ...) \
do { \
......
......@@ -28,8 +28,15 @@
#ifndef LL_LLFORMAT_H
#define LL_LLFORMAT_H
#if LL_WINDOWS
#pragma warning (push)
#pragma warning (disable : 4702) // compiler thinks unreachable code, but no
#endif
#include <fmt/format.h>
#include <fmt/compile.h>
#if LL_WINDOWS
#pragma warning (pop)
#endif
// Use as follows:
// LL_INFOS() << llformat("Test:%d (%.2f %.2f)", idx, x, y) << LL_ENDL;
......