loolwsd/LOOLKit.cpp | 22 ++++++++++------------ loolwsd/LOOLWSD.cpp | 2 -- 2 files changed, 10 insertions(+), 14 deletions(-)
New commits: commit 9266ffc09fdea870cc66d6cb71b4a12dff361c43 Author: Michael Meeks <michael.me...@collabora.com> Date: Fri Apr 1 23:07:32 2016 +0100 Remove apparently un-necessary thread local variable template. Change-Id: Ia220aff972827a0e49a8dadcdb8f32dcd3eed8c9 Reviewed-on: https://gerrit.libreoffice.org/23771 Reviewed-by: Ashod Nakashian <ashnak...@gmail.com> Tested-by: Ashod Nakashian <ashnak...@gmail.com> diff --git a/loolwsd/LOOLKit.cpp b/loolwsd/LOOLKit.cpp index 2794609..848dbf8 100644 --- a/loolwsd/LOOLKit.cpp +++ b/loolwsd/LOOLKit.cpp @@ -38,7 +38,6 @@ #include <Poco/Runnable.h> #include <Poco/StringTokenizer.h> #include <Poco/Thread.h> -#include <Poco/ThreadLocal.h> #include <Poco/Util/Application.h> #include <Poco/URI.h> @@ -68,7 +67,6 @@ using Poco::Process; using Poco::Runnable; using Poco::StringTokenizer; using Poco::Thread; -using Poco::ThreadLocal; using Poco::Util::Application; const std::string FIFO_BROKER = "loolbroker.fifo"; @@ -78,20 +76,20 @@ static int writerNotify = -1; namespace { - ThreadLocal<std::string> sourceForLinkOrCopy; - ThreadLocal<Path> destinationForLinkOrCopy; + std::string sourceForLinkOrCopy; + Path destinationForLinkOrCopy; int linkOrCopyFunction(const char *fpath, const struct stat* /*sb*/, int typeflag, struct FTW* /*ftwbuf*/) { - if (strcmp(fpath, sourceForLinkOrCopy->c_str()) == 0) + if (strcmp(fpath, sourceForLinkOrCopy.c_str()) == 0) return 0; - assert(fpath[strlen(sourceForLinkOrCopy->c_str())] == '/'); - const char *relativeOldPath = fpath + strlen(sourceForLinkOrCopy->c_str()) + 1; - Path newPath(*destinationForLinkOrCopy, Path(relativeOldPath)); + assert(fpath[strlen(sourceForLinkOrCopy.c_str())] == '/'); + const char *relativeOldPath = fpath + strlen(sourceForLinkOrCopy.c_str()) + 1; + Path newPath(destinationForLinkOrCopy, Path(relativeOldPath)); switch (typeflag) { @@ -153,10 +151,10 @@ namespace void linkOrCopy(const std::string& source, const Path& destination) { - *sourceForLinkOrCopy = source; - if (sourceForLinkOrCopy->back() == '/') - sourceForLinkOrCopy->pop_back(); - *destinationForLinkOrCopy = destination; + sourceForLinkOrCopy = source; + if (sourceForLinkOrCopy.back() == '/') + sourceForLinkOrCopy.pop_back(); + destinationForLinkOrCopy = destination; if (nftw(source.c_str(), linkOrCopyFunction, 10, FTW_ACTIONRETVAL) == -1) Log::error("linkOrCopy: nftw() failed for '" + source + "'"); } diff --git a/loolwsd/LOOLWSD.cpp b/loolwsd/LOOLWSD.cpp index 1dd6eef..033c2ec 100644 --- a/loolwsd/LOOLWSD.cpp +++ b/loolwsd/LOOLWSD.cpp @@ -101,7 +101,6 @@ DEALINGS IN THE SOFTWARE. #include <Poco/StreamCopier.h> #include <Poco/StringTokenizer.h> #include <Poco/TemporaryFile.h> -#include <Poco/ThreadLocal.h> #include <Poco/ThreadPool.h> #include <Poco/URI.h> #include <Poco/Util/HelpFormatter.h> @@ -157,7 +156,6 @@ using Poco::StreamCopier; using Poco::StringTokenizer; using Poco::TemporaryFile; using Poco::Thread; -using Poco::ThreadLocal; using Poco::ThreadPool; using Poco::URI; using Poco::Util::Application; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits