Skip to content
Permalink
Browse files

Removed use of "C" style time functions.

None of the functions are used and if they were used we should be using
C++11 std::chrono classes instead.

There were also potential memory leaks/corruption issues with returning
temporary variables from the functions.

Signed-off-by: Michael Jackson <mike.jackson@bluequartz.net>
  • Loading branch information
imikejackson committed Dec 27, 2019
1 parent bbd549e commit f9385b1ba764c4abf08699961c47b74dbddac1fa
@@ -38,21 +38,19 @@
#include "EMMPMFilter.h"

#include <QtGui/QColor>
#include <QtCore/QTextStream>

#include "EMMPM/EMMPMConstants.h"
#include "EMMPM/EMMPMLib/Common/EMMPM_Math.h"
#include "EMMPM/EMMPMLib/Common/EMTime.h"
#include "EMMPM/EMMPMLib/Common/StatsDelegate.h"
#include "EMMPM/EMMPMLib/Core/EMMPM.h"
#include "EMMPM/EMMPMLib/Core/EMMPMUtilities.h"
#include "EMMPM/EMMPMLib/Core/InitializationFunctions.h"
#include "EMMPM/EMMPMLib/EMMPMLib.h"
#include "EMMPM/FilterParameters/EMMPMFilterParameter.h"

#include <QtCore/QTextStream>
#include "EMMPM/EMMPMVersion.h"

#include "SIMPLib/Common/Constants.h"

#include "SIMPLib/FilterParameters/AbstractFilterParametersReader.h"
#include "SIMPLib/FilterParameters/BooleanFilterParameter.h"
#include "SIMPLib/FilterParameters/DataArrayCreationFilterParameter.h"
@@ -72,8 +70,6 @@
#include "SIMPLib/SIMPLibVersion.h"
#include "SIMPLib/DataContainers/DataContainerArray.h"

#include "EMMPM/EMMPMVersion.h"

/**
* @brief This message handler is used by EMMPMFilter instances to re-emit incoming generic messages from the
* EMMPM observable object as its own filter messages
@@ -34,22 +34,20 @@
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
#include <memory>

#include <QtCore/QTextStream>

#include "MultiEmmpmFilter.h"

#include "EMMPM/EMMPMConstants.h"
#include "EMMPM/EMMPMLib/Common/EMMPM_Math.h"
#include "EMMPM/EMMPMLib/Common/EMTime.h"
#include "EMMPM/EMMPMLib/Common/StatsDelegate.h"
#include "EMMPM/EMMPMLib/Core/EMMPM.h"
#include "EMMPM/EMMPMLib/Core/EMMPMUtilities.h"
#include "EMMPM/EMMPMLib/Core/EMMPM_Data.h"
#include "EMMPM/EMMPMLib/Core/InitializationFunctions.h"
#include "EMMPM/EMMPMLib/EMMPMLib.h"

#include <QtCore/QTextStream>

#include "SIMPLib/FilterParameters/AbstractFilterParametersReader.h"

#include "SIMPLib/FilterParameters/BooleanFilterParameter.h"
#include "SIMPLib/FilterParameters/MultiDataArraySelectionFilterParameter.h"
#include "SIMPLib/FilterParameters/SeparatorFilterParameter.h"

This file was deleted.

This file was deleted.

@@ -5,14 +5,12 @@
#-- This code was partly written under US Air Force Contract FA8650-07-D-5800
#--////////////////////////////////////////////////////////////////////////////
set (EMMPMLib_Common_SRCS
${EMMPMLib_SOURCE_DIR}/Common/EMTime.cpp
${EMMPMLib_SOURCE_DIR}/Common/StatsDelegate.cpp
)

set (EMMPMLib_Common_HDRS
${EMMPMLib_SOURCE_DIR}/Common/EMMPM_Math.h
${EMMPMLib_SOURCE_DIR}/Common/EMMPMLibDLLExport.h
${EMMPMLib_SOURCE_DIR}/Common/EMTime.h
${EMMPMLib_SOURCE_DIR}/Common/StatsDelegate.h
${EMMPMLib_SOURCE_DIR}/Common/MSVCDefines.h
)
@@ -44,7 +44,6 @@
#include "SIMPLib/Messages/GenericWarningMessage.h"

#include "EMMPMLib/Common/EMMPM_Math.h"
#include "EMMPMLib/Common/EMTime.h"
#include "EMMPMLib/Common/MSVCDefines.h"
#include "EMMPMLib/Core/EMCalculation.h"
#include "EMMPMLib/Core/EMMPMUtilities.h"
@@ -59,6 +58,7 @@ class EMMPMMessageHandler : public AbstractMessageHandler
{
public:
explicit EMMPMMessageHandler(EMMPM* emmpmObj) : m_EmmpmObject(emmpmObj) {}
virtual ~EMMPMMessageHandler() = default;

/**
* @brief Re-emits incoming GenericProgressMessages as FilterProgressMessages.
@@ -94,6 +94,12 @@ class EMMPMMessageHandler : public AbstractMessageHandler

private:
EMMPM* m_EmmpmObject = nullptr;

public:
EMMPMMessageHandler(const EMMPMMessageHandler&) = delete; // Copy Constructor Not Implemented
EMMPMMessageHandler(EMMPMMessageHandler&&) = delete; // Move Constructor Not Implemented
EMMPMMessageHandler& operator=(const EMMPMMessageHandler&) = delete; // Copy Assignment Not Implemented
EMMPMMessageHandler& operator=(EMMPMMessageHandler&&) = delete; // Move Assignment Not Implemented
};

// -----------------------------------------------------------------------------
@@ -45,7 +45,6 @@

//-- EMMMPM Lib Includes
#include "EMMPMLib/Common/EMMPM_Math.h"
#include "EMMPMLib/Common/EMTime.h"
#include "EMMPMLib/Common/MSVCDefines.h"
#include "EMMPMLib/Core/EMMPM.h"

@@ -57,7 +57,6 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <chrono>

#include "EMMPMLib/Common/EMMPM_Math.h"
#include "EMMPMLib/Common/EMTime.h"
#include "EMMPMLib/Common/MSVCDefines.h"
#include "EMMPMLib/Core/EMMPM.h"
#include "EMMPMLib/Core/EMMPMUtilities.h"

0 comments on commit f9385b1

Please sign in to comment.
You can’t perform that action at this time.