common/Png.hpp | 3 --- common/Protocol.hpp | 4 ++-- kit/Kit.cpp | 8 ++++---- 3 files changed, 6 insertions(+), 9 deletions(-)
New commits: commit 7d7e5a4bfe821597d3749492705cece5f72a8ab5 Author: Tor Lillqvist <[email protected]> Date: Wed Jan 11 14:02:34 2017 +0200 Remove assert as this function can also be called with a non-empty output vector Change-Id: Idff29a5bd298ada7b6d8fe3e76fd2e25d8f25c79 diff --git a/common/Png.hpp b/common/Png.hpp index ab6a795..b3c0863 100644 --- a/common/Png.hpp +++ b/common/Png.hpp @@ -127,9 +127,6 @@ bool encodeSubBufferToPNG(unsigned char* pixmap, size_t startX, size_t startY, return false; } - // This function seems to be always called with an empty _output_ vector. Make sure we can rely on that. - assert(output.size() == 0); - png_set_IHDR(png_ptr, info_ptr, width, height, 8, PNG_COLOR_TYPE_RGB_ALPHA, PNG_INTERLACE_NONE, PNG_COMPRESSION_TYPE_DEFAULT, PNG_FILTER_TYPE_DEFAULT); png_set_write_fn(png_ptr, &output, user_write_fn, user_flush_fn); commit 2eb40ab43cfd52d2d4d486c4e17cc2af9e856a77 Author: Tor Lillqvist <[email protected]> Date: Mon Jan 9 10:55:28 2017 +0200 Drop an unneeded (and defaulted) parameter Change-Id: I788080db53507604accd97dacc2d74e614b80641 diff --git a/common/Protocol.hpp b/common/Protocol.hpp index fa7ba7a..f9ccd6a 100644 --- a/common/Protocol.hpp +++ b/common/Protocol.hpp @@ -56,10 +56,10 @@ namespace LOOLProtocol } inline - bool parseNameIntegerPair(const std::string& token, std::string& name, int& value, const char delim = '=') + bool parseNameIntegerPair(const std::string& token, std::string& name, int& value) { std::string strValue; - return parseNameValuePair(token, name, strValue, delim) && stringToInteger(strValue, value); + return parseNameValuePair(token, name, strValue, '=') && stringToInteger(strValue, value); } bool getTokenInteger(const std::string& token, const std::string& name, int& value); commit 3f7cca78ebc4097117f0bbcc4a2ea2db56b11671 Author: Tor Lillqvist <[email protected]> Date: Fri Jan 6 11:15:13 2017 +0200 Indentation fixes Change-Id: I72010aeff7fb65f9dc18613d0cfc53b5154e07c1 diff --git a/kit/Kit.cpp b/kit/Kit.cpp index cd15e77..db96997 100644 --- a/kit/Kit.cpp +++ b/kit/Kit.cpp @@ -548,7 +548,7 @@ public: { LOG_INF("setDocumentPassword: passwordProtected=" << _isDocPasswordProtected << " passwordProvided=" << _haveDocPassword << - " password='" << _docPassword << "'"); + " password='" << _docPassword << "'"); Util::assertIsLocked(_documentMutex); @@ -702,13 +702,13 @@ public: for (Util::Rectangle& tileRect : tileRecs) { const size_t positionX = (tileRect.getLeft() - renderArea.getLeft()) / tileCombined.getTileWidth(); - const size_t positionY = (tileRect.getTop() - renderArea.getTop()) / tileCombined.getTileHeight(); + const size_t positionY = (tileRect.getTop() - renderArea.getTop()) / tileCombined.getTileHeight(); const auto oldSize = output.size(); const auto pixelWidth = tileCombined.getWidth(); const auto pixelHeight = tileCombined.getHeight(); if (!_pngCache.encodeSubBufferToPNG(pixmap.data(), positionX * pixelWidth, positionY * pixelHeight, - pixelWidth, pixelHeight, pixmapWidth, pixmapHeight, output, mode)) + pixelWidth, pixelHeight, pixmapWidth, pixmapHeight, output, mode)) { //FIXME: Return error. //sendTextFrame("error: cmd=tile kind=failure"); @@ -1102,7 +1102,7 @@ private: LOG_DBG("Calling lokit::documentLoad(" << uri << ")."); Timestamp timestamp; _loKitDocument.reset(_loKit->documentLoad(uri.c_str())); - LOG_DBG("Returned lokit::documentLoad(" << uri << ") in " << (timestamp.elapsed() / 1000.) << "ms."); + LOG_DBG("Returned lokit::documentLoad(" << uri << ") in " << (timestamp.elapsed() / 1000.) << "ms."); if (!_loKitDocument || !_loKitDocument->get()) { _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
