From: Scott Kostyshak Date: Sat, 28 Mar 2020 16:19:11 +0000 (-0400) Subject: Use << for raising 2 to power instead of ^ X-Git-Tag: lyx-2.4.0dev-acb2ca7b~1061 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=8f3c95f7570f84effc4601e88f13ff48c6084f0c;hp=104fdcc9be40df19d50cddad7f8ae9ab63bbf5f7;p=features.git Use << for raising 2 to power instead of ^ The ^ is interpretted as bitwise XOR, so 2^(20) evaluated to 22. Thanks to Riki for the << trick. This way, we do not have to use pow() and include the header for this one expression. --- diff --git a/src/graphics/PreviewLoader.cpp b/src/graphics/PreviewLoader.cpp index ac14fbb6a9..586ba48abc 100644 --- a/src/graphics/PreviewLoader.cpp +++ b/src/graphics/PreviewLoader.cpp @@ -727,7 +727,7 @@ void PreviewLoader::Impl::startLoading(bool wait) if (wait) { ForkedCall call(buffer_.filePath(), buffer_.layoutPos()); int ret = call.startScript(ForkedProcess::Wait, command); - static atomic_int fake((2^20) + 1); + static atomic_int fake((1 << 20) + 1); int pid = fake++; inprogress.pid = pid; inprogress.command = command;