# HG changeset patch
# User Santeri Piippo
# Date 1518529435 -7200
# Node ID 0fb1d3d17b60c4c59cef4f0b974075fab4d4c8ee
# Parent 725cb10840445ccc75869f5f556c5a74eb54abae
removed unneeded stuff
diff -r 725cb1084044 -r 0fb1d3d17b60 CMakeLists.txt
--- a/CMakeLists.txt Tue Feb 13 14:56:08 2018 +0200
+++ b/CMakeLists.txt Tue Feb 13 15:43:55 2018 +0200
@@ -95,7 +95,6 @@
src/documentation.h
src/documentloader.h
src/documentmanager.h
- src/doublemap.h
src/editHistory.h
src/format.h
src/glcamera.h
diff -r 725cb1084044 -r 0fb1d3d17b60 src/doublemap.h
--- a/src/doublemap.h Tue Feb 13 14:56:08 2018 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,105 +0,0 @@
-/*
- * LDForge: LDraw parts authoring CAD
- * Copyright (C) 2013 - 2017 Teemu Piippo
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-
-#pragma once
-#include
-
-template
-class DoubleMap
-{
-public:
- void clear()
- {
- m_map.clear();
- m_reverseMap.clear();
- }
-
- void insert (const Key& key, const Value& value)
- {
- m_map[key] = value;
- m_reverseMap[value] = key;
- }
-
- bool containsKey (const Key& key) const
- {
- return m_map.contains (key);
- }
-
- bool containsValue (const Value& value) const
- {
- return m_reverseMap.contains (value);
- }
-
- void removeKey (const Key& key)
- {
- m_reverseMap.remove (m_map[key]);
- m_map.remove (key);
- }
-
- void removeValue (const Key& key)
- {
- m_reverseMap.remove (m_map[key]);
- m_map.remove (key);
- }
-
- Value& lookup (const Key& key)
- {
- return m_map[key];
- }
-
- const Value& lookup (const Key& key) const
- {
- return m_map[key];
- }
-
- Key& reverseLookup (const Value& key)
- {
- return m_reverseMap[key];
- }
-
- const Key& reverseLookup (const Value& key) const
- {
- return m_reverseMap[key];
- }
-
- Value* find (const Key& key)
- {
- auto iterator = m_map.find (key);
- return iterator == m_map.end() ? NULL : &(*iterator);
- }
-
- Key* reverseFind (const Value& value)
- {
- auto iterator = m_reverseMap.find (value);
- return iterator == m_reverseMap.end() ? NULL : &(*iterator);
- }
-
- Value& operator[] (const Key& key)
- {
- return lookup (key);
- }
-
- const Value& operator[] (const Key& key) const
- {
- return lookup (key);
- }
-
-private:
- QMap m_map;
- QMap m_reverseMap;
-};
diff -r 725cb1084044 -r 0fb1d3d17b60 src/mainwindow.h
--- a/src/mainwindow.h Tue Feb 13 14:56:08 2018 +0200
+++ b/src/mainwindow.h Tue Feb 13 15:43:55 2018 +0200
@@ -26,7 +26,6 @@
#include
#include "linetypes/modelobject.h"
#include "colors.h"
-#include "doublemap.h"
class MessageManager;
class QToolButton;
@@ -162,7 +161,6 @@
class QSettings* m_settings;
DocumentManager* m_documents;
LDDocument* m_currentDocument;
- DoubleMap m_objectsInList;
QMap m_defaultShortcuts;
private slots: