From 3d61646cde6fddbea49d645a8cadca710579cf8d Mon Sep 17 00:00:00 2001 From: Marcel Greter Date: Mon, 17 Jun 2019 07:36:29 +0200 Subject: [PATCH] Disable unused sass 4.0 code-paths --- src/extender.cpp | 20 +++++++++++++++----- src/extender.hpp | 7 ------- 2 files changed, 15 insertions(+), 12 deletions(-) diff --git a/src/extender.cpp b/src/extender.cpp index 00b406552..2ae54df98 100644 --- a/src/extender.cpp +++ b/src/extender.cpp @@ -251,7 +251,9 @@ namespace Sass { // ########################################################################## // Helper function to copy extension between maps // ########################################################################## - void Extender::mapCopyExts( + // Seems only relevant for sass 4.0 modules + // ########################################################################## + /* void mapCopyExts( ExtSelExtMap& dest, const ExtSelExtMap& source) { @@ -271,7 +273,7 @@ namespace Sass { } } } - } + } */ // EO mapCopyExts // ########################################################################## @@ -353,11 +355,13 @@ namespace Sass { auto existingExtensions = extensionsByExtender.find(target); if (existingExtensions != extensionsByExtender.end()) { if (hasExistingExtensions && !existingExtensions->second.empty()) { - auto additionalExtensions = + // Seems only relevant for sass 4.0 modules + // auto additionalExtensions = extendExistingExtensions(existingExtensions->second, newExtensionsByTarget); - if (!additionalExtensions.empty()) { + // Seems only relevant for sass 4.0 modules + /* if (!additionalExtensions.empty()) { mapCopyExts(newExtensionsByTarget, additionalExtensions); - } + } */ } } @@ -455,6 +459,8 @@ namespace Sass { } else { sources.insert(complex, withExtender); + /* + // Seems only relevant for sass 4.0 modules for (auto& component : complex->elements()) { if (auto compound = component->getCompound()) { for (auto& simple : compound->elements()) { @@ -465,15 +471,19 @@ namespace Sass { if (newExtensions.find(extension.target) != newExtensions.end()) { additionalExtensions[extension.target].insert(complex, withExtender); } + */ } } // If [selectors] doesn't contain [extension.extender], // for example if it was replaced due to :not() expansion, // we must get rid of the old version. + /* + // Seems only relevant for sass 4.0 modules if (!containsExtension) { sources.erase(extension.extender); } + */ } diff --git a/src/extender.hpp b/src/extender.hpp index 270804968..c44e7f232 100644 --- a/src/extender.hpp +++ b/src/extender.hpp @@ -249,13 +249,6 @@ namespace Sass { const Extension& lhs, const Extension& rhs); - // ########################################################################## - // Helper function to copy extension between maps - // ########################################################################## - static void mapCopyExts( - ExtSelExtMap& dest, - const ExtSelExtMap& source); - // ########################################################################## // Extend [extensions] using [newExtensions]. // ##########################################################################