Auto format

fix-osga-rotate-wildly
AnyOldName3 10 months ago
parent 28131fd62b
commit ff3ffa13b6

@ -96,9 +96,10 @@ namespace MWGui
{
imageBox->setImageTexture(texturePath);
const MyGUI::IntSize imageSize = imageBox->getImageSize();
imageBox->setImageCoord(
MyGUI::IntCoord(static_cast<int>(texCoordOverride.left * imageSize.width), static_cast<int>(texCoordOverride.top * imageSize.height),
static_cast<int>(texCoordOverride.width * imageSize.width), static_cast<int>(texCoordOverride.height * imageSize.height)));
imageBox->setImageCoord(MyGUI::IntCoord(static_cast<int>(texCoordOverride.left * imageSize.width),
static_cast<int>(texCoordOverride.top * imageSize.height),
static_cast<int>(texCoordOverride.width * imageSize.width),
static_cast<int>(texCoordOverride.height * imageSize.height)));
}
}

@ -170,10 +170,7 @@ namespace MWInput
MWBase::Environment::get().getWindowManager()->notifyInputActionBound();
}
void setDetectingKeyboard(bool detecting)
{
mDetectingKeyboard = detecting;
}
void setDetectingKeyboard(bool detecting) { mDetectingKeyboard = detecting; }
private:
ICS::InputControlSystem* mInputBinder;

@ -6,22 +6,21 @@
#include <lz4frame.h>
#if defined(_MSC_VER)
// why is this necessary? These are included with /external:I
#pragma warning(push)
#pragma warning(disable : 4706)
#pragma warning(disable : 4702)
#include <boost/iostreams/copy.hpp>
#include <boost/iostreams/filter/zlib.hpp>
#include <boost/iostreams/filtering_stream.hpp>
#include <boost/iostreams/filtering_streambuf.hpp>
#include <boost/iostreams/filter/zlib.hpp>
#pragma warning(pop)
#else
#include <boost/iostreams/copy.hpp>
#include <boost/iostreams/filter/zlib.hpp>
#include <boost/iostreams/filtering_stream.hpp>
#include <boost/iostreams/filtering_streambuf.hpp>
#include <boost/iostreams/filter/zlib.hpp>
#endif
#include <boost/iostreams/device/array.hpp>

@ -12,13 +12,13 @@
#pragma warning(disable : 4706)
#pragma warning(disable : 4702)
#include <boost/iostreams/copy.hpp>
#include <boost/iostreams/filtering_streambuf.hpp>
#include <boost/iostreams/filter/zlib.hpp>
#include <boost/iostreams/filtering_streambuf.hpp>
#pragma warning(pop)
#else
#include <boost/iostreams/copy.hpp>
#include <boost/iostreams/filtering_streambuf.hpp>
#include <boost/iostreams/filter/zlib.hpp>
#include <boost/iostreams/filtering_streambuf.hpp>
#endif
#include <boost/iostreams/device/array.hpp>

@ -30,19 +30,18 @@
#include <lz4frame.h>
#if defined(_MSC_VER)
#pragma warning(push)
#pragma warning(disable : 4706)
#pragma warning(disable : 4702)
#include <boost/iostreams/copy.hpp>
#include <boost/iostreams/filtering_streambuf.hpp>
#include <boost/iostreams/filter/zlib.hpp>
#include <boost/iostreams/filtering_streambuf.hpp>
#pragma warning(pop)
#else
#include <boost/iostreams/copy.hpp>
#include <boost/iostreams/filtering_streambuf.hpp>
#include <boost/iostreams/filter/zlib.hpp>
#include <boost/iostreams/filtering_streambuf.hpp>
#endif
#include <boost/iostreams/device/array.hpp>

@ -190,10 +190,7 @@ namespace Debug
CurrentDebugLevel = Verbose;
}
virtual std::streamsize writeImpl(const char* str, std::streamsize size, Level debugLevel)
{
return size;
}
virtual std::streamsize writeImpl(const char* str, std::streamsize size, Level debugLevel) { return size; }
};
#if defined _WIN32 && defined _DEBUG

@ -77,7 +77,8 @@ namespace l10n
{
const auto key = it.first.as<std::string>();
const auto value = it.second.as<std::string>();
icu::UnicodeString pattern = icu::UnicodeString::fromUTF8(icu::StringPiece(value.data(), static_cast<std::int32_t>(value.size())));
icu::UnicodeString pattern = icu::UnicodeString::fromUTF8(
icu::StringPiece(value.data(), static_cast<std::int32_t>(value.size())));
icu::ErrorCode status;
UParseError parseError;
icu::MessageFormat message(pattern, langOrEn, parseError, status);
@ -115,7 +116,8 @@ namespace l10n
std::vector<icu::Formattable> argValues;
for (auto& [k, v] : args)
{
argNames.push_back(icu::UnicodeString::fromUTF8(icu::StringPiece(k.data(), static_cast<std::int32_t>(k.size()))));
argNames.push_back(
icu::UnicodeString::fromUTF8(icu::StringPiece(k.data(), static_cast<std::int32_t>(k.size()))));
argValues.push_back(v);
}
return formatMessage(key, argNames, argValues);
@ -174,13 +176,15 @@ namespace l10n
}
UParseError parseError;
icu::MessageFormat defaultMessage(
icu::UnicodeString::fromUTF8(icu::StringPiece(key.data(), static_cast<std::int32_t>(key.size()))), defaultLocale, parseError, success);
icu::UnicodeString::fromUTF8(icu::StringPiece(key.data(), static_cast<std::int32_t>(key.size()))),
defaultLocale, parseError, success);
if (!checkSuccess(success, std::string("Failed to create message ") + key.data(), parseError))
// If we can't parse the key as a pattern, just return the key
return std::string(key);
if (!args.empty() && !argNames.empty())
defaultMessage.format(argNames.data(), args.data(), static_cast<std::int32_t>(args.size()), result, success);
defaultMessage.format(
argNames.data(), args.data(), static_cast<std::int32_t>(args.size()), result, success);
else
defaultMessage.format(nullptr, nullptr, static_cast<std::int32_t>(args.size()), result, success);
checkSuccess(success, std::string("Failed to format message ") + key.data());

Loading…
Cancel
Save