Commit 00f8960e authored by Thomas Braun's avatar Thomas Braun
Browse files

common.h: Introduce DEFAULT_HISTORY_DEPTH to avoid duplication

parent 06c09a53
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -45,6 +45,7 @@
#include <algorithm>
#include "DatabaseConnectionHandle.h"
#include "Utils.h"
#include "common.h"

/* clang-format off */
/*----- PROTECTED REGION END -----*/	//	DataBase.cpp
@@ -431,7 +432,7 @@ void DataBase::init_device()
    }

    // Load history depth property
    historyDepth = 10;
    historyDepth = DEFAULT_HISTORY_DEPTH;
    try
    {
        Tango::DevVarStringArray *argin = new Tango::DevVarStringArray();
@@ -451,7 +452,7 @@ void DataBase::init_device()
                if(historyDepth == 0)
                {
                    TANGO_LOG << "Warning, Invalid historyDepth property, resetting to default value (10)" << std::endl;
                    historyDepth = 10;
                    historyDepth = DEFAULT_HISTORY_DEPTH;
                }
            }
        }
+2 −0
Original line number Diff line number Diff line
@@ -38,6 +38,8 @@ typedef bool my_bool;

#define DEFAULT_CONN_POOL_SIZE 20

#define DEFAULT_HISTORY_DEPTH 10

//	Define time measuremnt type (depends on OS)
#ifndef WIN32