Commit 1642ea48 authored by Mathieu Faverge's avatar Mathieu Faverge

Merge branch 'bugfix/sonar' into 'master'

Fix issues reported by Sonarqube and warnings reported by the compiler

See merge request !13
parents a4bfb9ef a73852cb
......@@ -36,4 +36,3 @@ sonar_vite:
- ./analysis.sh
only:
- master@solverstack/vite
......@@ -404,7 +404,7 @@ private:
double start = (i * (max_val - min_val))/nbreaks + min_val;
double end = ((i+1) * (max_val - min_val))/nbreaks + min_val;
printf("BIN[%d] = %d / %d - [ %lf, %lf [\n", i, cnt[i], total_cnt, start, end);
printf("BIN[%u] = %u / %u - [ %lf, %lf [\n", i, cnt[i], total_cnt, start, end);
}
/* Start from a blank canva */
......
......@@ -19,8 +19,8 @@ public:
virtual void finish() = 0;
protected:
bool m_is_finished;
bool m_is_canceled;
bool m_is_finished = false;
bool m_is_canceled = false;
};
#endif
......@@ -57,7 +57,7 @@ private:
QTime m_time;
QLabel* m_label;
char m_fpsString[256];
char m_fpsString[256] = { '\0' };
double m_qtToGLWidthCoeff;
double m_qtToGLHeightCoeff;
......@@ -68,11 +68,11 @@ private:
int m_mouseYClicked;
CameraPosition m_camera;
int m_drawTempSelection;
int m_tempSelectionX;
int m_tempSelectionY;
int m_tempSelectionDx;
int m_tempSelectionDy;
int m_drawTempSelection = 0;
int m_tempSelectionX = 0;
int m_tempSelectionY = 0;
int m_tempSelectionDx = 0;
int m_tempSelectionDy = 0;
// Zoom stack
std::stack<CameraPosition> m_savedPositions;
......
......@@ -286,18 +286,16 @@ void Session::get_palettes_name(const std::string &type, QStringList &list) {
}
Palette *Session::get_palette(const std::string &type, const std::string &palette_name) {
Palette *p, **where_from;
Palette *p = NULL;
if( type == "palette" ) {
p = _palettes_state;
where_from = &_palettes_state;
}
else if( type == "link_types" ) {
p = _palettes_link;
where_from = &_palettes_link;
}
else if( type == "event_types" ) {
p = _palettes_event;
where_from = &_palettes_event;
}
if(!p || p->get_name() != palette_name) {
......@@ -306,7 +304,6 @@ Palette *Session::get_palette(const std::string &type, const std::string &palett
QMap <QString, QVariant> qmap = S->value(QString::fromStdString(type+"/"+palette_name+"/map")).toMap();
p = new Palette(string(type+"/"+palette_name));
*where_from = p;
for(QMap<QString, QVariant>::const_iterator it = qmap.constBegin() ;
it != qmap.constEnd() ; ++ it) {
const QColor qc = it.value().value<QColor>();
......
......@@ -59,7 +59,7 @@ using namespace std;
bool convert_to_double(const std::string &arg, double *val) {
unsigned int nb_read;
// Try to convert first in the current locale
sscanf(arg.c_str(), "%lf%n", val, &nb_read);
sscanf(arg.c_str(), "%lf%u", val, &nb_read);
if(nb_read == arg.size()) {
return true; // It is the good format
......@@ -88,7 +88,7 @@ bool convert_to_double(const std::string &arg, double *val) {
}
// Reads the value in the new locale
sscanf(arg.c_str(), "%lf%n", val, &nb_read);
sscanf(arg.c_str(), "%lf%u", val, &nb_read);
return nb_read == arg.size();
}
}
......
......@@ -972,33 +972,46 @@ void Core::launch_action(int state, void* arg) {
//printf("we ask to switch %s and %s \n", container->get_name().to_string().c_str(), container2->get_name().to_string().c_str());
const std::list<Container*>* children=nullptr;
const std::list<Container*>* children = nullptr;
bool children_allocated = false;
if(parent==nullptr){//we switch top level containers
if( parent == nullptr ) {//we switch top level containers
children = _trace->get_view_root_containers();
if(children->empty()) children = _trace->get_root_containers();
}else{
if( children->empty() )
children = _trace->get_root_containers();
} else {
children = new std::list<Container*>(*parent->get_view_children());
if(children->empty()) children = parent->get_children();
if( children->empty() ) {
delete children;
children = parent->get_children();
}
else {
children_allocated = true;
}
}
std::list<Container*>::const_iterator it= children->begin();
const std::list<Container*>::const_iterator it_end= children->end();
if(parent!=nullptr){
if( parent != nullptr ) {
parent->clear_view_children();
for(; it!=it_end; it++){
if((*it)==container) parent->add_view_child(const_cast<Container*>(container2));
else if((*it)==container2) parent->add_view_child(const_cast<Container*>(container));
else parent->add_view_child(*it);
if( (*it) == container )
parent->add_view_child(const_cast<Container*>(container2));
else if( (*it) == container2 )
parent->add_view_child(const_cast<Container*>(container));
else
parent->add_view_child(*it);
}
}else{//for root containers we have to build a new list and fill it
} else {//for root containers we have to build a new list and fill it
std::list<Container*>* new_list= new std::list<Container*> ();
for(; it!=it_end; it++){
if((*it)==container){
if( (*it) == container ) {
new_list->push_back(const_cast<Container*>(container2));
}
else if((*it)==container2) new_list->push_back(const_cast<Container*>(container));
else new_list->push_back(*it);
else if( (*it) == container2 )
new_list->push_back(const_cast<Container*>(container));
else
new_list->push_back(*it);
}
_trace->set_view_root_containers(*new_list);
}
......@@ -1015,6 +1028,10 @@ void Core::launch_action(int state, void* arg) {
launch_action(Core:: _STATE_ZOOM_IN_AN_INTERVAL, &zoom);
launch_action(Core:: _STATE_RENDER_UPDATE);
if ( children_allocated ) {
delete children;
}
break;
}
......
......@@ -664,11 +664,13 @@ void
Settings_window::on_cb_nolinks_stateChanged(int index)
{
_c->launch_action(Core::_STATE_RENDER_UPDATE);
(void)index;
}
void
Settings_window::on_cb_noevents_stateChanged(int index)
{
_c->launch_action(Core::_STATE_RENDER_UPDATE);
(void)index;
}
......@@ -108,8 +108,8 @@ int main(int argc, char **argv) {
trace_finish(file, (clockGet()-timestamp), 0, -1);
memAllocUntrace();
#endif
fprintf(stdout, "Max Memory allocated : %ld\n", memAllocGetMax());
fprintf(stdout, "Memory still allocated : %ld\n", memAllocGetCurrent());
fprintf(stdout, "Max Memory allocated : %lu\n", memAllocGetMax());
fprintf(stdout, "Memory still allocated : %lu\n", memAllocGetCurrent());
#endif
return EXIT_SUCCESS;
......
/*
** This file is part of the ViTE project.
**
** This software is governed by the CeCILL-A license under French law
** and abiding by the rules of distribution of free software. You can
** use, modify and/or redistribute the software under the terms of the
** CeCILL-A license as circulated by CEA, CNRS and INRIA at the following
** URL: "http://www.cecill.info".
**
** As a counterpart to the access to the source code and rights to copy,
** modify and redistribute granted by the license, users are provided
** only with a limited warranty and the software's author, the holder of
** the economic rights, and the successive licensors have only limited
** liability.
**
** In this respect, the user's attention is drawn to the risks associated
** with loading, using, modifying and/or developing or reproducing the
** software by the user in light of its specific status of free software,
** that may mean that it is complicated to manipulate, and that also
** therefore means that it is reserved for developers and experienced
** professionals having in-depth computer knowledge. Users are therefore
** encouraged to load and test the software's suitability as regards
** their requirements in conditions enabling the security of their
** systems and/or data to be ensured and, more generally, to use and
** operate it in the same conditions as regards security.
**
** The fact that you are presently reading this means that you have had
** knowledge of the CeCILL-A license and that you accept its terms.
**
**
** ViTE developers are (for version 0.* to 1.0):
**
** - COULOMB Kevin
** - FAVERGE Mathieu
** - JAZEIX Johnny
** - LAGRASSE Olivier
** - MARCOUEILLE Jule
** - NOISETTE Pascal
** - REDONDY Arthur
** - VUCHENER Clément
**
*/
** This file is part of the ViTE project.
**
** This software is governed by the CeCILL-A license under French law
** and abiding by the rules of distribution of free software. You can
** use, modify and/or redistribute the software under the terms of the
** CeCILL-A license as circulated by CEA, CNRS and INRIA at the following
** URL: "http://www.cecill.info".
**
** As a counterpart to the access to the source code and rights to copy,
** modify and redistribute granted by the license, users are provided
** only with a limited warranty and the software's author, the holder of
** the economic rights, and the successive licensors have only limited
** liability.
**
** In this respect, the user's attention is drawn to the risks associated
** with loading, using, modifying and/or developing or reproducing the
** software by the user in light of its specific status of free software,
** that may mean that it is complicated to manipulate, and that also
** therefore means that it is reserved for developers and experienced
** professionals having in-depth computer knowledge. Users are therefore
** encouraged to load and test the software's suitability as regards
** their requirements in conditions enabling the security of their
** systems and/or data to be ensured and, more generally, to use and
** operate it in the same conditions as regards security.
**
** The fact that you are presently reading this means that you have had
** knowledge of the CeCILL-A license and that you accept its terms.
**
**
** ViTE developers are (for version 0.* to 1.0):
**
** - COULOMB Kevin
** - FAVERGE Mathieu
** - JAZEIX Johnny
** - LAGRASSE Olivier
** - MARCOUEILLE Jule
** - NOISETTE Pascal
** - REDONDY Arthur
** - VUCHENER Clément
**
*/
/**
* @file ParserDefinitionOTF2.hpp
*
......@@ -126,24 +126,24 @@ struct OTF2_Location {
* \brief Contains the definition of a function (equivalent in Paje : State)
*/
struct OTF2_Function {
/*! \brief Name of the state */
OTF2_StringRef _name_id;
/*! \brief Alternative name of the region (e.g. mangled name */
OTF2_StringRef _canonicalName;
/*! \brief A more detailed description of this region */
OTF2_StringRef _region_description;
/*! \brief Region role. */
OTF2_RegionRole _regionRole;
/*! \brief Paradigm. */
OTF2_Paradigm _paradigm;
/*! \brief Region flags. */
OTF2_RegionFlag _regionFlags;
/*! \brief The source file where this region was declared */
OTF2_StringRef _sourceFile;
/*! \brieg Starting line number of this region in the source file. */
uint32_t _begin_line_number;
/*! \brieg Ending line number of this region in the source file. */
uint32_t _end_line_number;
/*! \brief Name of the state */
OTF2_StringRef _name_id;
/*! \brief Alternative name of the region (e.g. mangled name */
OTF2_StringRef _canonicalName;
/*! \brief A more detailed description of this region */
OTF2_StringRef _region_description;
/*! \brief Region role. */
OTF2_RegionRole _regionRole;
/*! \brief Paradigm. */
OTF2_Paradigm _paradigm;
/*! \brief Region flags. */
OTF2_RegionFlag _regionFlags;
/*! \brief The source file where this region was declared */
OTF2_StringRef _sourceFile;
/*! \brieg Starting line number of this region in the source file. */
uint32_t _begin_line_number;
/*! \brieg Ending line number of this region in the source file. */
uint32_t _end_line_number;
};
struct OTF2_MetricMember {
......
This diff is collapsed.
/*
** This file is part of the ViTE project.
**
** This software is governed by the CeCILL-A license under French law
** and abiding by the rules of distribution of free software. You can
** use, modify and/or redistribute the software under the terms of the
** CeCILL-A license as circulated by CEA, CNRS and INRIA at the following
** URL: "http://www.cecill.info".
**
** As a counterpart to the access to the source code and rights to copy,
** modify and redistribute granted by the license, users are provided
** only with a limited warranty and the software's author, the holder of
** the economic rights, and the successive licensors have only limited
** liability.
**
** In this respect, the user's attention is drawn to the risks associated
** with loading, using, modifying and/or developing or reproducing the
** software by the user in light of its specific status of free software,
** that may mean that it is complicated to manipulate, and that also
** therefore means that it is reserved for developers and experienced
** professionals having in-depth computer knowledge. Users are therefore
** encouraged to load and test the software's suitability as regards
** their requirements in conditions enabling the security of their
** systems and/or data to be ensured and, more generally, to use and
** operate it in the same conditions as regards security.
**
** The fact that you are presently reading this means that you have had
** knowledge of the CeCILL-A license and that you accept its terms.
**
**
** ViTE developers are (for version 0.* to 1.0):
**
** - COULOMB Kevin
** - FAVERGE Mathieu
** - JAZEIX Johnny
** - LAGRASSE Olivier
** - MARCOUEILLE Jule
** - NOISETTE Pascal
** - REDONDY Arthur
** - VUCHENER Clément
**
*/
** This file is part of the ViTE project.
**
** This software is governed by the CeCILL-A license under French law
** and abiding by the rules of distribution of free software. You can
** use, modify and/or redistribute the software under the terms of the
** CeCILL-A license as circulated by CEA, CNRS and INRIA at the following
** URL: "http://www.cecill.info".
**
** As a counterpart to the access to the source code and rights to copy,
** modify and redistribute granted by the license, users are provided
** only with a limited warranty and the software's author, the holder of
** the economic rights, and the successive licensors have only limited
** liability.
**
** In this respect, the user's attention is drawn to the risks associated
** with loading, using, modifying and/or developing or reproducing the
** software by the user in light of its specific status of free software,
** that may mean that it is complicated to manipulate, and that also
** therefore means that it is reserved for developers and experienced
** professionals having in-depth computer knowledge. Users are therefore
** encouraged to load and test the software's suitability as regards
** their requirements in conditions enabling the security of their
** systems and/or data to be ensured and, more generally, to use and
** operate it in the same conditions as regards security.
**
** The fact that you are presently reading this means that you have had
** knowledge of the CeCILL-A license and that you accept its terms.
**
**
** ViTE developers are (for version 0.* to 1.0):
**
** - COULOMB Kevin
** - FAVERGE Mathieu
** - JAZEIX Johnny
** - LAGRASSE Olivier
** - MARCOUEILLE Jule
** - NOISETTE Pascal
** - REDONDY Arthur
** - VUCHENER Clément
**
*/
#include <iostream>
#include <fstream>
......@@ -77,7 +77,7 @@ mt_ParserOTF::mt_ParserOTF(const string &filename) : Parser(filename) {}
mt_ParserOTF::~mt_ParserOTF() {};
void mt_ParserOTF::parse(Trace &trace,
bool finish_trace_after_parse) {
bool finish_trace_after_parse) {
ParserDefinitionOTF *parserdefinition;
......@@ -91,13 +91,13 @@ void mt_ParserOTF::parse(Trace &trace,
const std::string filename = get_next_file_to_parse();
if(filename == "")
return ;
/* OTF_MasterControl* mc;
mc = OTF_MasterControl_new( manager );
OTF_MasterControl_read( mc, filename.c_str());
/* OTF_MasterControl* mc;
mc = OTF_MasterControl_new( manager );
OTF_MasterControl_read( mc, filename.c_str());
uint32_t streamcount = OTF_MasterControl_getCount( mc );
uint32_t streamcount = OTF_MasterControl_getCount( mc );
printf("nb of streams %d\n", streamcount);*/
printf("nb of streams %d\n", streamcount);*/
OTF_Reader *reader;
int ret = 0;
......@@ -111,14 +111,14 @@ void mt_ParserOTF::parse(Trace &trace,
int n_events=10000;
OTF_Trace_builder_struct* tb_structs= new OTF_Trace_builder_struct[n_events];
parserevent2->connect((const QObject*)this,
SIGNAL(build_trace(int, OTF_Trace_builder_struct*)),
SLOT(build_trace(int, OTF_Trace_builder_struct*)));
SIGNAL(build_trace(int, OTF_Trace_builder_struct*)),
SLOT(build_trace(int, OTF_Trace_builder_struct*)));
parserevent2->connect((const QObject*)this,
SIGNAL(build_finished()),
SLOT(build_finished()));
QThread traceThread;
SIGNAL(build_finished()),
SLOT(build_finished()));
QThread traceThread;
parserevent2->moveToThread(&traceThread);
traceThread.start();
traceThread.start();
reader = OTF_Reader_open(filename.c_str(), manager);
if(reader == NULL) {
......@@ -129,6 +129,7 @@ void mt_ParserOTF::parse(Trace &trace,
if(finish_trace_after_parse) { // true by default
trace.finish();
}
delete[] tb_structs;
return;
}
......@@ -153,7 +154,7 @@ void mt_ParserOTF::parse(Trace &trace,
freeSlots.acquire(); //do not produce too fast (5 blocks max at a time)
emit(build_trace(n_read, tb_structs));
linesProduced.release();
tb_structs= new OTF_Trace_builder_struct[n_events];
tb_structs = new OTF_Trace_builder_struct[n_events];
}
freeSlots.acquire(); //do not produce too fast (5 blocks max at a time)
......@@ -166,8 +167,8 @@ void mt_ParserOTF::parse(Trace &trace,
while ( ((ret=parserevent->read_markers(reader, tb_structs,&n_read)) != 0)
&& (!_is_canceled)) {
freeSlots.acquire(); //do not produce too fast (5 blocks max at a time)
emit(build_trace(n_read, tb_structs));
freeSlots.acquire(); //do not produce too fast (5 blocks max at a time)
emit(build_trace(n_read, tb_structs));
linesProduced.release();
tb_structs= new OTF_Trace_builder_struct[n_events];
}
......@@ -183,9 +184,9 @@ void mt_ParserOTF::parse(Trace &trace,
}
QMutexLocker locker(&mutex);
emit build_finished();
ended.wait(&mutex);
locker.unlock();
emit build_finished();
ended.wait(&mutex);
locker.unlock();
traceThread.quit();
traceThread.wait();
delete parserevent;
......
......@@ -209,7 +209,7 @@ void ParserDefinitionPaje::enter_definition(const PajeLine_t *line){
}
// Get the trid of the definition in the trace (trid)
if(sscanf(tridstr, "%u", &trid) != 1){
if(sscanf(tridstr, "%d", &trid) != 1){
Error::set(Error::VITE_ERR_EXPECT_ID_DEF, line->_id, Error::VITE_ERRCODE_ERROR);
return;
}
......@@ -232,7 +232,7 @@ void ParserDefinitionPaje::enter_definition(const PajeLine_t *line){
}
// Everything is ok, we initialize the currentEvtDef
assert(_defid == _EventDefs.size());
assert( _defid == (int)_EventDefs.size());
def._name = defname;
def._id = _AvailableEvDef[defname]._id;
......@@ -266,7 +266,7 @@ void ParserDefinitionPaje::leave_definition(const PajeLine_t *line){
// We remove the definition
_EvDefTrId2Id.erase(_EventDefs[_defid]._trid);
_EventDefs.pop_back();
assert( _defid == _EventDefs.size() );
assert( _defid == (int)_EventDefs.size() );
return;
}
......@@ -274,7 +274,7 @@ void ParserDefinitionPaje::leave_definition(const PajeLine_t *line){
PajeDef::print(&_FieldNames,&_EventDefs[_defid]);
#endif
_defid++;
assert( _defid == _EventDefs.size() );
assert( _defid == (int)_EventDefs.size() );
}
void ParserDefinitionPaje::add_field_to_definition(const PajeLine_t *line){
......@@ -320,7 +320,7 @@ void ParserDefinitionPaje::add_field_to_definition(const PajeLine_t *line){
strcpy_s(newfn, size, fieldname);
#endif
// In case there are more than the default value
if(_FieldNames.size() <= _nbFieldNames) {
if ( (int)_FieldNames.size() <= _nbFieldNames ) {
_FieldNames.resize(2*_nbFieldNames);
}
_FieldNames[_nbFieldNames]._name = newfn;
......
......@@ -100,7 +100,7 @@ void ParserEventPaje::store_event(const PajeLine *line,
int idname, idtype;
// We check if we have an event identifier
if(sscanf(line->_tokens[0], "%u", &trid) != 1){
if(sscanf(line->_tokens[0], "%d", &trid) != 1){
Error::set(Error::VITE_ERR_EXPECT_ID_DEF, line->_id, Error::VITE_ERRCODE_WARNING);
return;
}
......
......@@ -99,7 +99,7 @@ int mt_ParserEventPaje::store_event(const PajeLine *line,
int idname, idtype;
// We check if we have an event identifier
if(sscanf(line->_tokens[0], "%u", &trid) != 1){
if(sscanf(line->_tokens[0], "%d", &trid) != 1){
Error::set(Error::VITE_ERR_EXPECT_ID_DEF, line->_id, Error::VITE_ERRCODE_WARNING);
return -1;
}
......
......@@ -179,7 +179,6 @@ void mt_ParserPaje::parse(Trace &trace,
std::string filename = get_next_file_to_parse();
while(filename != "") {
mt_PajeFileManager *file;
// Open the trace
try {
_file = new mt_PajeFileManager(filename.c_str());
......@@ -247,8 +246,7 @@ void mt_ParserPaje::parse(Trace &trace,
}
//send the last batch
emit produced(i, line);
line=NULL;
delete file;
line = NULL;
//send the finish signal to the BuilderThread, which will do the same to the TraceBuilderThread
//both threads will then be finished and ready to destroy
......
......@@ -113,7 +113,11 @@ void ParsingThread::dump(const std::string &path,
_is_finished = true;
#if defined(USE_ITC) && defined(BOOST_SERIALIZE)
if(! _is_killed)_trace->dump(path, filename);
if(! _is_killed)
_trace->dump(path, filename);
#else
(void)path;
(void)filename;
#endif
//locks the mutex and automatically unlocks it when going out of scope
......
......@@ -203,6 +203,9 @@ public:
*/
inline void draw_container_text(const Element_pos x, const Element_pos y, const std::string &value)
{
(void)x;
(void)y;
(void)value;
return;
}
......@@ -386,7 +389,7 @@ public:
*/
inline void draw_text_value(long int id, double text, double y)
{
_render->draw_text_value(id,text,y);
_render->draw_text_value( id, text, y );
}
/*!
......
This diff is collapsed.
......@@ -94,17 +94,17 @@ class Render_alternate : public Hook_event, public Render
{
Q_OBJECT
private:
/*struct for using freetype for text rendering
see http://en.wikibooks.org/wiki/OpenGL_Programming/Modern_OpenGL_Tutorial_Text_Rendering_02
/*struct character_info {
float ax; // advance.x
float ay; // advance.y
float bw; // bitmap.width;
float bh; // bitmap.rows;
float bl; // bitmap_left;
float bt; // bitmap_top;
float tx; // x offset of glyph in texture coordinates
} char_info[128];*/
// struct for using freetype for text rendering
// see http://en.wikibooks.org/wiki/OpenGL_Programming/Modern_OpenGL_Tutorial_Text_Rendering_02
// struct character_info {
// float ax; // advance.x
// float ay; // advance.y
// float bw; // bitmap.width;
// float bh; // bitmap.rows;
// float bl; // bitmap_left;
// float bt; // bitmap_top;
// float tx; // x offset of glyph in texture coordinates
// } char_info[128];
//FT_Library library;
//FT_Face face;
//int atlas_width;
......
......@@ -251,6 +251,8 @@ void Render_svg::draw_arrow(const Element_pos start_time,
draw_triangle(end_time, end_height, triangle_size, angle);
draw_line(start_time, start_height, end_time, end_height, _z_arrow);
(void)r; (void)g; (void)b;
}
void Render_svg::end_draw_arrows(){
......@@ -345,6 +347,7 @@ void Render_svg::update_vertical_line(){
}
void Render_svg::set_vertical_line(Element_pos l){
(void)l;
}
void Render_svg::call_ruler(){
......
......@@ -288,7 +288,11 @@ public:
* \param text text to draw.
* \param y y position of the point.
*/
void draw_text_value(long int id, double text, double y) override{}
void draw_text_value(long int id, double text, double y) override {
(void)id;
(void)text;
(void)y;
}
/*!
* \brief draws the vertical helper line
......
......@@ -18,7 +18,8 @@ Shader::Shader() : m_vertex_code("#version 330 core \n"
}
/*Constructor for shaders using textures. Parameter n is not used, it just allow to create a have another constructor. */
Shader::Shader(int glsl, int n):m_vertexID(0), m_fragmentID(0), m_programID(0){
Shader::Shader(int glsl, int n) : m_vertexID(0), m_fragmentID(0), m_programID(0)
{
std::ostringstream os1, os2;
os1 << "#version ";
os1 << glsl;
......@@ -30,6 +31,8 @@ Shader::Shader(int glsl, int n):m_vertexID(0), m_fragmentID(0), m_programID(0){
m_fragment_code = os2.str();
//std::cout << m_vertex_code << std::endl;
//std::cout << m_fragment_code << std::endl;
(void)n;
}
/* Construct a Shader reading colors in the VBO. Still used for containers, selection*/
......
......@@ -454,43 +454,43 @@ public:
assert(color);
if(link_is_in_set(link,set_container,interval))
draw_link(draw_object, link, color, value);
/*bool display=false;
color=NULL;
if(!Session::get_use_palette("link_types")) display = true;
else{
if (link->get_type()){
Palette *lt = Session::get_palette("link_types", Session::get_current_palette("link_types"));
color = lt->get_color(link->get_type()->get_name().to_string());
if(color) display=true;
*/
/*for(std::list<std::string>::const_iterator it2= link_types->get_->begin();