Mentions légales du service

Skip to content
Snippets Groups Projects

Resolve "Update: Simple Visualization Clang Diagnostique"

Files
42
@@ -77,11 +77,9 @@ bool CAlgorithmLevelMeasure::uninitialize()
bool CAlgorithmLevelMeasure::process()
{
if (this->isInputTriggerActive(OVP_Algorithm_LevelMeasure_InputTriggerId_Reset))
{
if (m_ipMatrix->getDimensionCount() != 1 && m_ipMatrix->getDimensionCount() != 2)
{
getLogManager() << Kernel::LogLevel_ImportantWarning << "Input matrix does not have 1 or 2 dimensions (" << m_ipMatrix->getDimensionCount() << ")\n";
if (this->isInputTriggerActive(OVP_Algorithm_LevelMeasure_InputTriggerId_Reset)) {
if (m_ipMatrix->getDimensionCount() != 1 && m_ipMatrix->getDimensionCount() != 2) {
getLogManager() << Kernel::LogLevel_Warning << "Input matrix does not have 1 or 2 dimensions (" << m_ipMatrix->getDimensionCount() << ")\n";
return false;
}
@@ -91,10 +89,8 @@ bool CAlgorithmLevelMeasure::process()
GtkTable* table = GTK_TABLE(gtk_builder_get_object(m_mainWidgetInterface, "level-measure-table"));
gtk_table_resize(table, nRow, nCol);
for (guint i = 0; i < nRow; ++i)
{
for (guint j = 0; j < nCol; ++j)
{
for (guint i = 0; i < nRow; ++i) {
for (guint j = 0; j < nCol; ++j) {
GtkBuilder* gtkBuilder = gtk_builder_new();
gtk_builder_add_from_file(gtkBuilder, Directories::getDataDir() + "/plugins/simple-visualization/openvibe-simple-visualization-LevelMeasure.ui",
nullptr);
@@ -116,20 +112,17 @@ bool CAlgorithmLevelMeasure::process()
m_opToolbarWidget = m_toolbarWidget;
}
if (this->isInputTriggerActive(OVP_Algorithm_LevelMeasure_InputTriggerId_Refresh))
{
if (this->isInputTriggerActive(OVP_Algorithm_LevelMeasure_InputTriggerId_Refresh)) {
auto it = m_ProgressBar.begin();
double* iBuffer = m_ipMatrix->getBuffer();
size_t n = m_ipMatrix->getBufferElementCount();
while (n--)
{
while (n--) {
double percent = *iBuffer;
if (percent > 1) { percent = 1; }
if (percent < 0) { percent = 0; }
if (percent > m_Threshold && !it->lastWasOverThreshold)
{
if (percent > m_Threshold && !it->lastWasOverThreshold) {
it->score++;
it->lastWasOverThreshold = true;
}
Loading