Subversion Repositories tpanel

Rev

Rev 462 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 462 Rev 486
Line 19... Line 19...
19
#include "tmap.h"
19
#include "tmap.h"
20
#include "texpat++.h"
20
#include "texpat++.h"
21
#include "tresources.h"
21
#include "tresources.h"
22
#include "tconfig.h"
22
#include "tconfig.h"
23
#include "terror.h"
23
#include "terror.h"
-
 
24
#include "ttpinit.h"
24
 
25
 
25
#if __cplusplus < 201402L
26
#if __cplusplus < 201402L
26
#   error "This module requires at least C++14 standard!"
27
#   error "This module requires at least C++14 standard!"
27
#else
28
#else
28
#   if __cplusplus < 201703L
29
#   if __cplusplus < 201703L
Line 81... Line 82...
81
        MSG_ERROR("File \"" << path << "\" is not a regular readable file!");
82
        MSG_ERROR("File \"" << path << "\" is not a regular readable file!");
82
        return false;
83
        return false;
83
    }
84
    }
84
 
85
 
85
    TExpat xml(path);
86
    TExpat xml(path);
-
 
87
 
-
 
88
    if (!TTPInit::isTP5())
86
    xml.setEncoding(ENC_CP1250);
89
        xml.setEncoding(ENC_CP1250);
-
 
90
    else
-
 
91
        xml.setEncoding(ENC_UTF8);
87
 
92
 
88
    if (!xml.parse())
93
    if (!xml.parse())
89
        return false;
94
        return false;
90
 
95
 
91
    int depth = 0;
96
    int depth = 0;
Line 366... Line 371...
366
    DECL_TRACER("TAmxCommands::findBargraphs(int port, vector<int>& channels)");
371
    DECL_TRACER("TAmxCommands::findBargraphs(int port, vector<int>& channels)");
367
 
372
 
368
    vector<MAP_T> map;
373
    vector<MAP_T> map;
369
    vector<int>::iterator iter;
374
    vector<int>::iterator iter;
370
 
375
 
371
    if (channels.size() == 0)
376
    if (channels.empty())
372
        return map;
377
        return map;
373
 
378
 
374
    for (iter = channels.begin(); iter != channels.end(); ++iter)
379
    for (iter = channels.begin(); iter != channels.end(); ++iter)
375
    {
380
    {
376
        vector<MAP_T>::iterator mapIter;
381
        vector<MAP_T>::iterator mapIter;
377
 
382
 
378
        if (mMap.map_lm.size() > 0)
383
        if (!mMap.map_lm.empty())
379
        {
384
        {
380
            for (mapIter = mMap.map_lm.begin(); mapIter != mMap.map_lm.end(); ++mapIter)
385
            for (mapIter = mMap.map_lm.begin(); mapIter != mMap.map_lm.end(); ++mapIter)
381
            {
386
            {
382
                // To find also the joysticks, we must test for level codes
387
                // To find also the joysticks, we must test for level codes
383
                // less then and grater then *iter.
388
                // less then and grater then *iter.