[Libreoffice-commits] core.git: bin/gbuild-to-ide

Edmund Wong ew at crazy-cat.org
Thu Jan 12 07:16:10 UTC 2017


 bin/gbuild-to-ide |    7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

New commits:
commit a6931e8d00a77e6db9390aeee9a8b0b533986220
Author: Edmund Wong <ew at crazy-cat.org>
Date:   Wed Dec 14 13:06:05 2016 +0800

    No need for a separate variable. Just get the value directly from the dictionary.
    
    Change-Id: Ic8a707ac78cf5ad3e225131ae23f1f1277f3ae7c
    Reviewed-on: https://gerrit.libreoffice.org/31991
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: jan iversen <jani at documentfoundation.org>

diff --git a/bin/gbuild-to-ide b/bin/gbuild-to-ide
index d4eb5e9..6fdcb3f 100755
--- a/bin/gbuild-to-ide
+++ b/bin/gbuild-to-ide
@@ -775,7 +775,7 @@ class VisualStudioIntegrationGenerator(IdeIntegrationGenerator):
 
     def __init__(self, gbuildparser, ide):
         IdeIntegrationGenerator.__init__(self, gbuildparser, ide)
-        self.toolset = self.retrieve_toolset(ide)
+        self.toolset = self.retrieve_toolset()
         self.solution_directory = './'
         self.configurations = {
             'Build': {
@@ -795,9 +795,8 @@ class VisualStudioIntegrationGenerator(IdeIntegrationGenerator):
             }
         }
 
-    def retrieve_toolset(self, ide):
-        ide_toolset_map = {'vs2013': 'v120', 'vs2015': 'v140'}
-        return ide_toolset_map[ide]
+    def retrieve_toolset(self):
+        return {'vs2013': 'v120', 'vs2015': 'v140'}.get(self.ide, None)
 
     def module_make_command(self, targets):
         return '%(sh)s -c "PATH=\\"/bin:$PATH\\";BUILDDIR=\\"%(builddir)s\\" %(makecmd)s -rsC %(location)s ' + targets + '"'


More information about the Libreoffice-commits mailing list