Commit d7a891c8 authored by Mathieu Faverge's avatar Mathieu Faverge

Apply patch 6 from issue #13 - clang performance

parent 18589100
......@@ -104,7 +104,7 @@ const string Error::VITE_ERR_FIELD_NOT_ALLOWED = "This type is not all
const string Error::VITE_ERR_EVENT_NOT_CORRECT = "The definition of this event is not correct : ";
void Error::set(const string kind_of_error, const int priority){
void Error::set(const string &kind_of_error, const int priority){
Error::_content = kind_of_error;
switch(priority){
......@@ -117,18 +117,18 @@ void Error::set(const string kind_of_error, const int priority){
}
}
void Error::set(const string kind_of_error, const unsigned int line_number, const int priority){
void Error::set(const string &kind_of_error, const unsigned int line_number, const int priority){
char line[sizeof(line_number)*3+3+1];
snprintf(line, sizeof(line), "%d : ", line_number);
set(line + kind_of_error, priority);
}
void Error::set_and_print(const string kind_of_error, const int priority){
void Error::set_and_print(const string &kind_of_error, const int priority){
set(kind_of_error, priority);
print(priority);
}
void Error::set_and_print(const string kind_of_error, const unsigned int line_number, const int priority){
void Error::set_and_print(const string &kind_of_error, const unsigned int line_number, const int priority){
char line[sizeof(line_number)*3+1];
snprintf(line, sizeof(line), "%d", line_number);
set(kind_of_error + " on line " + line, priority);
......@@ -136,7 +136,7 @@ void Error::set_and_print(const string kind_of_error, const unsigned int line_nu
}
bool Error::set_if(bool condition, const string kind_of_error, const unsigned int line_number, const int priority){
bool Error::set_if(bool condition, const string &kind_of_error, const unsigned int line_number, const int priority){
if(condition){
char line[sizeof(line_number)*3+1];
snprintf(line, sizeof(line), "%d", line_number);
......@@ -159,7 +159,7 @@ void Error::print(const int priority) {
}
}
void Error::print(const string content, const int priority) {
void Error::print(const string &content, const int priority) {
*Message::get_instance() << content;
switch(priority){
case VITE_ERRCODE_WARNING:
......
......@@ -205,38 +205,38 @@ public:
const static std::string VITE_ERR_EVENT_NOT_CORRECT;
/*!
* \fn set(const std::string kind_of_error, const int priority) static void
* \fn set(const std::string &kind_of_error, const int priority) static void
* \brief raise an error or a warning
* \param kind_of_error : content of error
* \param priority : _ERROR or _WARNING
*/
static void set(const std::string kind_of_error, const int priority);
static void set(const std::string &kind_of_error, const int priority);
/*!
* \fn set(const std::string kind_of_error, const unsigned int line_number, const int priority) static void
* \fn set(const std::string &kind_of_error, const unsigned int line_number, const int priority) static void
* \brief raise an error or a warning
* \param kind_of_error : content of error
* \param line_number : the line in the trace file where the error occurs.
* \param priority : _ERROR or _WARNING
*/
static void set(const std::string kind_of_error, const unsigned int line_number, const int priority);
static void set(const std::string &kind_of_error, const unsigned int line_number, const int priority);
/*!
* \fn set_and_print(const std::string kind_of_error, const int priority) static void
* \fn set_and_print(const std::string &kind_of_error, const int priority) static void
* \brief raise and throw to the interface an error or a warning
* \param kind_of_error : content of error
* \param priority : _ERROR or _WARNING
*/
static void set_and_print(const std::string kind_of_error, const int priority);
static void set_and_print(const std::string &kind_of_error, const int priority);
/*!
* \fn set_and_print(const std::string kind_of_error, const unsigned int line_number, const int priority) static void
* \fn set_and_print(const std::string &kind_of_error, const unsigned int line_number, const int priority) static void
* \brief raise and throw to the interface an error or a warning and the line when it occurs
* \param kind_of_error : content of error
* \param line_number : position of the error in the trace
* \param priority : _ERROR or _WARNING
*/
static void set_and_print(const std::string kind_of_error, const unsigned int line_number, const int priority);
static void set_and_print(const std::string &kind_of_error, const unsigned int line_number, const int priority);
/*!
* \fn print(const int priority) static void
......@@ -246,15 +246,15 @@ public:
static void print(const int priority);
/*!
* \fn print(const std::string content, const int priority) static void
* \fn print(const std::string &content, const int priority) static void
* \brief print the current error
* \param content : the string we want to print
* \param priority : _ERROR or _WARNING
*/
static void print(const std::string content, const int priority);
static void print(const std::string &content, const int priority);
/*!
* \fn set_if(bool condition, const std::string kind_of_error, const unsigned int line_number, const int priority) static bool
* \fn set_if(bool condition, const std::string &kind_of_error, const unsigned int line_number, const int priority) static bool
* \brief raise an error or a warning and the line when it occurs if the condition is satisfied
* \param condition : a condition
* \param kind_of_error : content of error
......@@ -262,7 +262,7 @@ public:
* \param priority : _ERROR or _WARNING
* \return true if the condition is satisfied
*/
static bool set_if(bool condition, const std::string kind_of_error, const unsigned int line_number, const int priority);
static bool set_if(bool condition, const std::string &kind_of_error, const unsigned int line_number, const int priority);
/*!
* \fn print_numbers() static void
......
......@@ -251,12 +251,12 @@ void Session::save_plugin_directories(const QStringList &list) {
}
/*** States color ***/
void Session::set_use_palette(const std::string type, bool use) {
void Session::set_use_palette(const std::string &type, bool use) {
S->setValue(QString::fromStdString(type+"/is_used"), use);
_use_palettes = use;
}
bool Session::get_use_palette(const std::string type) {
bool Session::get_use_palette(const std::string &type) {
//quick way, if we use the palettes, we don't need to check each time that we use them in the _settings file, only the first time
if(_use_palettes_is_set)
return _use_palettes;
......@@ -267,25 +267,25 @@ bool Session::get_use_palette(const std::string type) {
}
}
std::string Session::get_current_palette(const std::string type) {
std::string Session::get_current_palette(const std::string &type) {
std::string tmp = S->value(QString::fromStdString(type+CUR_PALETTE)).toString().toStdString();
if(tmp == "")
tmp = "default";
return tmp;
}
void Session::set_current_palette(const std::string type, const std::string &name) {
void Session::set_current_palette(const std::string &type, const std::string &name) {
S->setValue(QString::fromStdString(type+CUR_PALETTE), QString::fromStdString(name));
}
void Session::get_palettes_name(const std::string type, QStringList &list) {
void Session::get_palettes_name(const std::string &type, QStringList &list) {
list = S->value(QString::fromStdString(type+PALETTE_NAMES)).toStringList();
if(!list.contains("default")) {
list.append("default");
}
}
Palette *Session::get_palette(const std::string type, const std::string &palette_name) {
Palette *Session::get_palette(const std::string &type, const std::string &palette_name) {
Palette *p, **where_from;
if( type == "palette" ) {
p = _palettes_state;
......@@ -317,13 +317,13 @@ Palette *Session::get_palette(const std::string type, const std::string &palette
return p;
}
void Session::create_palette(const std::string type, const std::string &name) {
void Session::create_palette(const std::string &type, const std::string &name) {
QStringList list = S->value(QString::fromStdString(type+PALETTE_NAMES)).toStringList();
list.append(QString::fromStdString(name));
S->setValue(QString::fromStdString(type+PALETTE_NAMES), list);
}
void Session::remove_palette(const std::string type, const std::string &name) {
void Session::remove_palette(const std::string &type, const std::string &name) {
QStringList list = S->value(QString::fromStdString(type+PALETTE_NAMES)).toStringList();
list.removeOne(QString::fromStdString(name));
S->setValue(QString::fromStdString(type+PALETTE_NAMES), list);
......@@ -332,7 +332,7 @@ void Session::remove_palette(const std::string type, const std::string &name) {
S->setValue(_name, QMap <QString, QVariant>());
}
void Session::copy_palette(const std::string type, const std::string &src, const std::string &dest) {
void Session::copy_palette(const std::string &type, const std::string &src, const std::string &dest) {
// Save the palette
QStringList list = S->value(QString::fromStdString(type+PALETTE_NAMES)).toStringList();
list.append(QString::fromStdString(dest));
......@@ -348,7 +348,7 @@ void Session::copy_palette(const std::string type, const std::string &src, const
}
void
Session::add_state_to_palette(const std::string type,
Session::add_state_to_palette(const std::string &type,
const std::string &palette_name,
const std::string &state_name,
const Color &c, bool visible)
......@@ -363,7 +363,7 @@ Session::add_state_to_palette(const std::string type,
}
void
Session::remove_state_to_palette(const std::string type,
Session::remove_state_to_palette(const std::string &type,
const std::string &palette_name,
const std::string &state_name)
{
......
......@@ -279,51 +279,51 @@ public:
* \brief Set if we use the current palette when we load a trace.
* \param use : true if we use the current palette.
*/
static void set_use_palette(const std::string type, bool use);
static void set_use_palette(const std::string &type, bool use);
/*!
* \fn get_use_palette()
* \brief Get if we use the current palette when we load a trace.
*/
static bool get_use_palette(const std::string type);
static bool get_use_palette(const std::string &type);
/*!
* \fn get_palettes_name(QStringList &list)
* \brief Fill the list with all the existing palettes name.
* \param list : the list filled
*/
static void get_palettes_name(const std::string type, QStringList &list);
static void get_palettes_name(const std::string &type, QStringList &list);
/*!
* \fn get_palette(const std::string &name)
* \brief Create and return the palette with the name passed in parameter.
* \param name : the name of the required palette
*/
static Palette *get_palette(const std::string type, const std::string &name = "default");
static Palette *get_palette(const std::string &type, const std::string &name = "default");
/*!
* \fn get_current_palette()
* \brief return the name of the current palette (last used)
*/
static std::string get_current_palette(const std::string type);
static std::string get_current_palette(const std::string &type);
/*!
* \fn set_current_palette(const std::string &name)
* \brief set the name of the current palette
* \param name : the name of the palette
*/
static void set_current_palette(const std::string type, const std::string &name);
static void set_current_palette(const std::string &type, const std::string &name);
/*!
* \fn create_palette(const std::string &name)
* \brief Create an empty palette named name.
* \param name : the name of the palette
*/
static void create_palette(const std::string type, const std::string &name);
static void create_palette(const std::string &type, const std::string &name);
/*!
* \fn remove_palette(const std::string &name)
* \brief Remove the palette named name.
* \param name : the name of the palette
*/
static void remove_palette(const std::string type, const std::string &name);
static void remove_palette(const std::string &type, const std::string &name);
/*!
* \fn copy_palette(const std::string &src, const std::string &dest)
......@@ -331,7 +331,7 @@ public:
* \param src : the name of the source palette
* \param dest : the name of the destination palette
*/
static void copy_palette(const std::string type, const std::string &src, const std::string &dest);
static void copy_palette(const std::string &type, const std::string &src, const std::string &dest);
/*!
* \fn add_state_to_palette(const std::string &palette_name, const std::string &state_name, const Color &c)
* \brief Add the state with its color of the palette.
......@@ -339,14 +339,14 @@ public:
* \param state_name : the state name
* \param c : the state color
*/
static void add_state_to_palette(const std::string type, const std::string &palette_name, const std::string &state_name, const Color &c, bool visible);
static void add_state_to_palette(const std::string &type, const std::string &palette_name, const std::string &state_name, const Color &c, bool visible);
/*!
* \fn remove_state_to_palette(const std::string &palette_name, const std::string &state_name)
* \brief Remove the state of the palette.
* \param palette_name : the palette name
* \param state_name : the state name
*/
static void remove_state_to_palette(const std::string type, const std::string &palette_name, const std::string &state_name);
static void remove_state_to_palette(const std::string &type, const std::string &palette_name, const std::string &state_name);
};
#endif
......@@ -366,7 +366,7 @@ void Node_select::reassign_children_rec(QTreeWidgetItem* item, QFlags<Qt::Check
void Node_select::set_filename(string filename){
_file_viewed = filename;
_file_viewed = std::move(filename);
}
......
......@@ -76,7 +76,7 @@ Settings_tab::Settings_tab(Core *core, std::string ecname)
{
_changed = false;
_core = core;
_ecname = ecname;
_ecname = std::move(ecname);
// Create the header
hdr_label = new QLabel(this);
......@@ -315,7 +315,7 @@ Settings_tab::fill_table( bool used )
}
void
Settings_tab::update_table_from_palette( string pname )
Settings_tab::update_table_from_palette( const string &pname )
{
Session &S = Session::getSession();
Palette *p = S.get_palette(_ecname, pname);
......
......@@ -105,7 +105,7 @@ private:
EntityValue *ev,
bool used );
void fill_table( bool used=true );
void update_table_from_palette( std::string );
void update_table_from_palette(const std::string &);
public slots:
void on_btn_apply_clicked();
......
......@@ -107,8 +107,8 @@ void ParsingThread::finish_build(bool finish_trace_after_parse)
_closed->wakeAll();
}
void ParsingThread::dump(std::string path,
std::string filename)
void ParsingThread::dump(const std::string &path,
const std::string &filename)
{
_is_finished = true;
......
......@@ -104,10 +104,10 @@ protected slots:
void finish_build(bool f);
/*!
* \fn dump(std::string path)
* \fn dump(const std::string &path, const std::string &filename)
* \brief dumps the remaining IntervalOfContainer at path path
*/
void dump(std::string path,
std::string filename);
void dump(const std::string &path,
const std::string &filename);
};
#endif // PARSING_THREAD_HPP
......@@ -135,7 +135,7 @@ void Plugin_window::load_shared_plugins() {
QFileInfoList list = dir.entryInfoList();
for (int i = 0 ; i < list.size() ; ++ i) {
QFileInfo fileInfo = list.at(i);
const QFileInfo &fileInfo = list.at(i);
QString filename = fileInfo.absoluteFilePath();
if(!QLibrary::isLibrary(filename)) {
......
......@@ -201,7 +201,7 @@ public:
*
* This function stores text in a list. This list will be display each time the render area need to be updated.
*/
inline void draw_container_text(const Element_pos x, const Element_pos y, const std::string value)
inline void draw_container_text(const Element_pos x, const Element_pos y, const std::string &value)
{
return;
}
......
......@@ -245,7 +245,7 @@ for(int i = 32; i < 128; i++) {
}
void Render_alternate::render_text(QString text, float x, float y, float w, float h){
void Render_alternate::render_text(const QString &text, float x, float y, float w, float h){
/* Code trying to create text on QImage and create a texture from this. Then render the text thanks to this texture. Not working yet, the texture seems to be empty*/
GLuint texture;
checkGlError();
......@@ -955,7 +955,7 @@ void Render_alternate::start_draw_containers(){
void Render_alternate::draw_container(const Element_pos , const Element_pos , const Element_pos , const Element_pos ){
}
void Render_alternate::draw_container_text(const Element_pos , const Element_pos , const std::string ){
void Render_alternate::draw_container_text(const Element_pos , const Element_pos , const std::string &){
}
void Render_alternate::end_draw_containers(){
......@@ -1302,7 +1302,7 @@ Render_alternate::update_ev( EntityValue *ev )
}
/* Change the shader associated to entityType entity */
void Render_alternate::change_color(std::string entity,
void Render_alternate::change_color(const std::string &entity,
Element_col r,
Element_col g,
Element_col b)
......@@ -1327,7 +1327,7 @@ void Render_alternate::change_color(std::string entity,
}
/*Same operating mode as change_color */
void Render_alternate::change_event_color(std::string event, Element_col r, Element_col g, Element_col b){
void Render_alternate::change_event_color(const std::string &event, Element_col r, Element_col g, Element_col b){
std::map<EntityValue*, std::pair<Vbo*, Vbo*> >::iterator it;
it = _events.begin();
while(it != _events.end()){
......@@ -1346,7 +1346,7 @@ void Render_alternate::change_event_color(std::string event, Element_col r, Elem
}
}
/*Same operating mode as change_color */
void Render_alternate::change_link_color(std::string link, Element_col r, Element_col g, Element_col b){
void Render_alternate::change_link_color(const std::string &link, Element_col r, Element_col g, Element_col b){
std::map<EntityValue*, std::pair<Vbo*, Vbo*> >::iterator it;
it = _arrows.begin();
while(it != _arrows.end()){
......@@ -1366,7 +1366,7 @@ void Render_alternate::change_link_color(std::string link, Element_col r, Elemen
}
}
void Render_alternate::change_visible(std::string entity, bool visible){
void Render_alternate::change_visible(const std::string &entity, bool visible){
std::map<EntityValue*, Vbo*>::iterator it;
it = _states.begin();
while(it != _states.end()){
......@@ -1379,7 +1379,7 @@ void Render_alternate::change_visible(std::string entity, bool visible){
}
}
void Render_alternate::change_event_visible(std::string event, bool visible){
void Render_alternate::change_event_visible(const std::string &event, bool visible){
std::map<EntityValue*, std::pair<Vbo*, Vbo*> >::iterator it;
it = _events.begin();
while(it != _events.end()){
......@@ -1392,7 +1392,7 @@ void Render_alternate::change_event_visible(std::string event, bool visible){
}
}
void Render_alternate::change_link_visible(std::string link, bool visible){
void Render_alternate::change_link_visible(const std::string &link, bool visible){
std::map<EntityValue*, std::pair<Vbo*, Vbo*> >::iterator it;
it = _arrows.begin();
while(it != _arrows.end()){
......
......@@ -257,7 +257,7 @@ public:
*
* This function stores text in a list. This list will be display each time the render area need to be updated.
*/
void draw_container_text(const Element_pos x, const Element_pos y, const std::string value);
void draw_container_text(const Element_pos x, const Element_pos y, const std::string &value);
/*!
* \brief Closes the container display list.
......@@ -578,17 +578,17 @@ public slots:
* \brief Change the color corresponding to an EntityValue
*/
void change_color(std::string entity, Element_col r, Element_col g, Element_col b);
void change_color(const std::string &entity, Element_col r, Element_col g, Element_col b);
void change_event_color(std::string event, Element_col r, Element_col g, Element_col b);
void change_event_color(const std::string &event, Element_col r, Element_col g, Element_col b);
void change_link_color(std::string link, Element_col r, Element_col g, Element_col b);
void change_link_color(const std::string &link, Element_col r, Element_col g, Element_col b);
void change_visible(std::string entity, bool visible);
void change_visible(const std::string &entity, bool visible);
void change_event_visible(std::string event, bool visible);
void change_event_visible(const std::string &event, bool visible);
void change_link_visible(std::string link, bool visible);
void change_link_visible(const std::string &link, bool visible);
/*!
* \brief reload state color from trace file
......@@ -599,7 +599,7 @@ public slots:
void reload_events();
void render_text(QString text, float x, float y, float w, float h);
void render_text(const QString &text, float x, float y, float w, float h);
void update_ev( EntityValue *ev );
};
......
......@@ -846,7 +846,7 @@ void Render_opengl::draw_container(const Element_pos, const Element_pos, const E
}
void Render_opengl::draw_container_text(const Element_pos, const Element_pos, const std::string ){
void Render_opengl::draw_container_text(const Element_pos, const Element_pos, const std::string &){
}
void Render_opengl::end_draw_containers(){
......
......@@ -335,7 +335,7 @@ public:
*
* This function stores text in a list. This list will be display each time the render area need to be updated.
*/
void draw_container_text(const Element_pos x, const Element_pos y, const std::string value);
void draw_container_text(const Element_pos x, const Element_pos y, const std::string &value);
/*!
* \brief Draw a point of the counter.
......
......@@ -207,7 +207,7 @@ void Render_svg::start_draw_containers(){
void Render_svg::draw_container(const Element_pos , const Element_pos , const Element_pos , const Element_pos ){
}
void Render_svg::draw_container_text(const Element_pos , const Element_pos , const std::string ){
void Render_svg::draw_container_text(const Element_pos , const Element_pos , const std::string &){
}
void Render_svg::end_draw_containers(){
......
......@@ -114,7 +114,7 @@ public:
*
* This function stores text in a list. This list will be display each time the render area need to be updated.
*/
void draw_container_text(const Element_pos x, const Element_pos y, const std::string value);
void draw_container_text(const Element_pos x, const Element_pos y, const std::string &value);
/*!
* \brief Closes the container display list.
......
......@@ -201,7 +201,7 @@ bool Shader::charger()
}
bool Shader::compilerShader(GLuint &shader, GLenum type, std::string code)
bool Shader::compilerShader(GLuint &shader, GLenum type, const std::string code)
{
// Create shader
shader = glCreateShader(type);
......
......@@ -37,7 +37,7 @@ class Shader
/*Loading function*/
bool charger();
/*Compilation function*/
bool compilerShader(GLuint &shader, GLenum type, std::string code);
bool compilerShader(GLuint &shader, GLenum type, const std::string &code);
/*Getter*/
GLuint getProgramID() const;
......
......@@ -57,7 +57,7 @@
using namespace std;
Render_stats_svg::Render_stats_svg(string filename){
_filename = filename;
_filename = std::move(filename);
_y_min = 0;
_y_max = 0;
}
......
......@@ -155,7 +155,7 @@ void Stats_window::set_container_names_rec(QTreeWidgetItem *current_node, Contai
}
void Stats_window::set_filename(string filename){
_file_viewed = filename;
_file_viewed = std::move(filename);
}
......@@ -187,7 +187,7 @@ void Stats_window::set_trace(Trace *trace) {
}
}
void Stats_window::set_selected_nodes(string kind_of_state){
void Stats_window::set_selected_nodes(const string &kind_of_state){
const map<std::string, StateType *> *states_types_list;
map<std::string, StateType *>::const_iterator itstat;
map<std::string, StateType *>::const_iterator endstat;
......
......@@ -199,7 +199,7 @@ private:
/*!
* \brief Fill the vector of selected containers depending on the ones chosen in the tree widget
*/
void set_selected_nodes(std::string);
void set_selected_nodes(const std::string &);
/*!
......
......@@ -82,11 +82,11 @@ Container::Container(Name name,
ContainerType *type,
Container *parent,
map<string, Value *> &opt)
: _name(name), _creation_time(creation_time),
: _name(std::move(name)), _creation_time(std::move(creation_time)),
_destruction_time(0.0), _type(type),
_parent(parent), _n_states(0), _state_tree(nullptr),
_n_events(0), _event_tree(nullptr), _n_variables(0),
_extra_fields(opt)
_extra_fields(std::move(opt))
{
if (parent) {
_depth = parent->_depth+1;
......@@ -155,7 +155,7 @@ void Container::add_view_child(Container *child) {
}
}
void Container::add_current_state(Date end) {
void Container::add_current_state(const Date &end) {
#ifdef USE_ITC
State* new_state=_intervalsOfContainer.back()->add_state(
_current_states.top().start,
......@@ -214,7 +214,7 @@ void Container::add_current_state(Date end) {
_n_states++;
}
void Container::set_state(Date time, StateType *type, EntityValue *value, map<string, Value *> &opt) {
void Container::set_state(const Date &time, StateType *type, EntityValue *value, map<string, Value *> &opt) {
if (!_current_states.empty()) {
......@@ -226,7 +226,7 @@ void Container::set_state(Date time, StateType *type, EntityValue *value, map<st
_current_states.push(t);
}
void Container::push_state(Date time, StateType *type, EntityValue *value, map<string, Value *> &opt) {
void Container::push_state(const Date &time, StateType *type, EntityValue *value, map<string, Value *> &opt) {
if (!_current_states.empty())
add_current_state(time);
......@@ -234,7 +234,7 @@ void Container::push_state(Date time, StateType *type, EntityValue *value, map<s
_current_states.push(t);
}
void Container::pop_state(Date time) {
void Container::pop_state(const Date &time) {
if (!_current_states.empty()) {
add_current_state(time);
_current_states.pop();
......@@ -245,7 +245,7 @@ void Container::pop_state(Date time) {
}
}
void Container::reset_state(Date time) {
void Container::reset_state(const Date &time) {
if (!_current_states.empty()) {
add_current_state(time);
while( !_current_states.empty() ){
......@@ -254,7 +254,7 @@ void Container::reset_state(Date time) {
}
}
void Container::new_event(Date time, EventType *type, EntityValue *value, map<string, Value *> &opt) {
void Container::new_event(const Date &time, EventType *type, EntityValue *value, map<string, Value *> &opt) {
#ifdef USE_ITC
_intervalsOfContainer.back()->add_event(time, type,this, value, opt);
#else
......@@ -264,8 +264,8 @@ void Container::new_event(Date time, EventType *type, EntityValue *value, map<st
}
void Container::start_link(Date time, LinkType *type, Container *source,
EntityValue *value, String key, map<std::string, Value *> &opt)
void Container::start_link(const Date &time, LinkType *type, Container *source,
EntityValue *value, const String &key, map<std::string, Value *> &opt)
{
map<String, std::list<current_link_t>, String::less_than>::iterator i = _current_received_links.find(key);
......@@ -338,7 +338,7 @@ void Container::start_link(Date time, LinkType *type, Container *source,
}
}
void Container::end_link(Date time, Container *destination, String key, map<string, Value *> &opt) {
void Container::end_link(const Date &time, Container *destination, const String &key, map<string, Value *> &opt) {
map<String, std::list<current_link_t>, String::less_than>::iterator i = _current_sent_links.find(key);
if (i == _current_sent_links.end())
......@@ -413,7 +413,7 @@ void Container::end_link(Date time, Container *destination, String key, map<stri
}
}
void Container::set_variable(Date time, VariableType *type, Double value) {
void Container::set_variable(const Date &time, VariableType *type, const Double &value) {
#ifdef USE_ITC
int i=0;
IntervalOfContainer* itc= _intervalsOfContainer.back();
......@@ -440,7 +440,7 @@ void Container::set_variable(Date time, VariableType *type, Double value) {
#endif
}
void Container::add_variable(Date time, VariableType *type, Double value) {
void Container::add_variable(const Date &time, VariableType *type, const Double &value) {
#ifdef USE_ITC
int i=0;
IntervalOfContainer* itc= _intervalsOfContainer.back();
......@@ -467,7 +467,7 @@ void Container::add_variable(Date time, VariableType *type, Double value) {
#endif
}
void Container::sub_variable(Date time, VariableType *type, Double value) {
void Container::sub_variable(const Date &time, VariableType *type, const Double &value) {