Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
nmsdk
rdk
Commits
7b54ee07eb67
Commit
ae46c17d
authored
Jun 12, 2021
by
Alexab
Browse files
Some warnings removed.
--HG-- branch : MockCompsTest
parent
40d161abaf7c
Changes
13
Hide whitespace changes
Inline
Side-by-side
Core/Application/Qt/UServerTransportTcpQt.cpp
View file @
7b54ee07
...
...
@@ -116,7 +116,6 @@ void UServerTransportTcpQt::SetServerBinding(std::string &interface_address, int
server
->
listen
(
ha
,
port
);
server
->
close
();
QString
s
=
server
->
serverAddress
().
toString
();
int
i
=
0
;
}
//
...
...
@@ -413,7 +412,7 @@ void UServerTransportTcpQt::SendResponseBuffer(std::vector<unsigned char> buffer
buf
=
new
char
[
buffer
.
size
()];
memcpy
(
buf
,
&
buffer
[
0
],
buffer
.
size
());
out
.
writeBytes
(
buf
,
buffer
.
size
());
out
.
writeBytes
(
buf
,
uint
(
buffer
.
size
())
)
;
return
;
}
}
...
...
Core/Application/UEngineControlThread.cpp
View file @
7b54ee07
...
...
@@ -297,7 +297,7 @@ void UEngineControlThread::Calculate(void)
RDK
::
UIControllerStorage
::
AfterCalculate
(
EngineIndex
);
CalculationNotInProgress
->
set
();
Profiler
->
CalculateCore
();
LastFullStepDuration
=
MModel_GetFullStepDuration
(
EngineIndex
,
0
);
LastFullStepDuration
=
int
(
MModel_GetFullStepDuration
(
EngineIndex
,
0
)
)
;
}
void
UEngineControlThread
::
Execute
(
void
)
...
...
Core/Application/UServerControl.cpp
View file @
7b54ee07
...
...
@@ -494,12 +494,12 @@ void UServerControl::ConvertVectorToString(const UParamT &source, std::string &d
void
UServerControl
::
SendCommandResponse
(
UServerTransport
*
transport
,
std
::
string
&
client_address
,
RDK
::
UParamT
&
dest
,
std
::
vector
<
RDK
::
UParamT
>
&
binary_data
)
{
UTransferPacket
packet
;
packet
.
SetNumParams
(
1
+
binary_data
.
size
());
packet
.
SetParamSize
(
0
,
dest
.
size
());
packet
.
SetNumParams
(
1
+
int
(
binary_data
.
size
())
)
;
packet
.
SetParamSize
(
0
,
int
(
dest
.
size
())
)
;
packet
.
SetParam
(
0
,
dest
);
for
(
size_t
i
=
0
;
i
<
binary_data
.
size
();
i
++
)
{
packet
.
SetParamSize
(
i
+
1
,
binary_data
[
i
].
size
());
packet
.
SetParamSize
(
i
+
1
,
int
(
binary_data
[
i
].
size
())
)
;
packet
.
SetParam
(
i
+
1
,
binary_data
[
i
]);
}
RDK
::
UParamT
buffer
;
...
...
Core/Engine/UBasePropCreatorTempl.h
View file @
7b54ee07
...
...
@@ -101,7 +101,7 @@ bool BaseCrPropMockTempl(RDK::USerStorageXML* serstorage, RDK::UMockUNet* mock_u
CreatorT
::
template
CreateProperty
<
UPropertyOutputData
,
ptPubOutput
>(
serstorage
,
mock_unet
,
p_type
);
}
}
catch
(
UComponent
::
EPropertyNameAlreadyExist
&
e
)
catch
(
UComponent
::
EPropertyNameAlreadyExist
&
)
{
}
...
...
Core/Engine/UContainer.cpp
View file @
7b54ee07
...
...
@@ -1271,7 +1271,7 @@ UId UContainer::AddComponent(UEPtr<UContainer> comp, UEPtr<UIPointer> pointer)
const
UEPtr
<
UIProperty
>
prop_ts
=
FindProperty
(
"TimeStep"
);
unsigned
int
time_step_prop_type
=
prop_ts
->
GetType
();
if
(
time_step_prop_type
&
ptPubParameter
==
ptPubParameter
)
if
(
(
time_step_prop_type
&
ptPubParameter
)
==
ptPubParameter
)
comp
->
ChangeUseIndTimeStepMode
(
true
);
else
comp
->
ChangeUseIndTimeStepMode
(
false
);
...
...
@@ -1348,7 +1348,7 @@ void UContainer::AddStaticComponent(const NameT &classname, const NameT &name, U
const
UEPtr
<
UIProperty
>
prop_ts
=
FindProperty
(
"TimeStep"
);
unsigned
int
time_step_prop_type
=
prop_ts
->
GetType
();
if
(
time_step_prop_type
&
ptPubParameter
==
ptPubParameter
)
if
(
(
time_step_prop_type
&
ptPubParameter
)
==
ptPubParameter
)
comp
->
ChangeUseIndTimeStepMode
(
true
);
else
comp
->
ChangeUseIndTimeStepMode
(
false
);
...
...
Core/Engine/UContainer.h
View file @
7b54ee07
...
...
@@ -1099,7 +1099,7 @@ bool PreparePropertyLogString(const UVariable& variable, unsigned int expected_t
template
<
class
T
>
const
vector
<
NameT
>&
UContainer
::
GetComponentsNameByClassType
(
vector
<
NameT
>
&
buffer
,
UEPtr
<
UContainer
>
net
,
bool
find_all
)
{
size_
t
numComp
=
GetNumComponents
();
in
t
numComp
=
int
(
GetNumComponents
()
)
;
UEPtr
<
UContainer
>
comp
;
UEPtr
<
UContainer
>
root
(
net
);
string
compName
;
...
...
@@ -1110,7 +1110,7 @@ const vector<NameT>& UContainer::GetComponentsNameByClassType(vector<NameT> &buf
switch
(
find_all
)
{
case
false
:
for
(
size_
t
i
=
0
;
i
<
numComp
;
i
++
)
for
(
in
t
i
=
0
;
i
<
numComp
;
i
++
)
{
comp
=
GetComponentByIndex
(
i
);
if
(
dynamic_pointer_cast
<
T
>
(
comp
))
...
...
@@ -1122,7 +1122,7 @@ const vector<NameT>& UContainer::GetComponentsNameByClassType(vector<NameT> &buf
break
;
case
true
:
for
(
size_
t
i
=
0
;
i
<
numComp
;
i
++
)
for
(
in
t
i
=
0
;
i
<
numComp
;
i
++
)
{
comp
=
GetComponentByIndex
(
i
);
comp
->
GetComponentsNameByClassType
<
T
>
(
buffer
,
root
,
true
);
...
...
Core/Engine/UController.cpp
View file @
7b54ee07
...
...
@@ -177,7 +177,7 @@ void UControllerDataReader::SetTimeInterval(double value)
{
TimeInterval
=
value
;
if
(
value
>
0
)
SetNumPoints
(
value
*
Component
->
GetTimeStep
());
SetNumPoints
(
int
(
value
*
Component
->
GetTimeStep
())
)
;
else
SetNumPoints
(
100000
);
}
...
...
@@ -339,7 +339,7 @@ bool UControllerDataReaderTimeEvents::AUpdate(void)
if
(
PropertyType
!=
3
)
return
false
;
double
x
(
0.0
)
,
y
(
0.0
)
;
double
x
(
0.0
);
const
MDMatrix
<
double
>
*
data
=
reinterpret_cast
<
const
MDMatrix
<
double
>*>
(
Property
->
GetMemoryArea
());
if
(
!
data
)
...
...
Core/Engine/UEnvironment.cpp
View file @
7b54ee07
...
...
@@ -773,8 +773,8 @@ void UEnvironment::RTCalculate(void)
int
i
=
0
;
if
(
LastDuration
<
timer_interval
)
LastDuration
=
timer_interval
;
double
realtime
=
Time
.
GetSourceCurrentLocalTime
();
double
doubletime
=
Time
.
GetDoubleTime
();
//
double realtime=Time.GetSourceCurrentLocalTime();
//
double doubletime=Time.GetDoubleTime();
double
model_duration
=
Time
.
GetSourceCurrentLocalTime
()
-
Time
.
GetDoubleTime
();
double
model_start_calc_time
=
Time
.
GetDoubleTime
();
...
...
Core/Engine/ULibrary.cpp
View file @
7b54ee07
...
...
@@ -604,9 +604,9 @@ UEPtr<UContainer> URuntimeLibrary::CreateClassSample(UStorage *storage, USerStor
// .
void
URuntimeLibrary
::
CreateClassSamples
(
UStorage
*
storage
)
{
in
t
num_classes
=
ClassesStructures
.
size
();
size_
t
num_classes
=
ClassesStructures
.
size
();
for
(
in
t
i
=
0
;
i
<
num_classes
;
i
++
)
for
(
size_
t
i
=
0
;
i
<
num_classes
;
i
++
)
{
try
{
...
...
@@ -735,7 +735,7 @@ UEPtr<UContainer> UMockLibrary::CreateClassSample(USerStorageXML &xml, UStorage
// .
void
UMockLibrary
::
CreateClassSamples
(
UStorage
*
storage
)
{
int
num_classes
=
ClassesStructures
.
size
();
int
num_classes
=
int
(
ClassesStructures
.
size
()
)
;
for
(
int
i
=
0
;
i
<
num_classes
;
i
++
)
{
...
...
Core/Engine/UStorage.cpp
View file @
7b54ee07
...
...
@@ -1161,7 +1161,7 @@ bool UStorage::DeleteRuntimeCollection(const std::string &lib_name)
UEPtr
<
ULibrary
>
lib
=
CollectionList
[
i
];
if
(
lib
&&
lib
->
GetName
()
==
lib_name
)
{
index
=
i
;
index
=
i
nt
(
i
)
;
break
;
}
}
...
...
Core/Serialize/UXMLStdSerialize.h
View file @
7b54ee07
...
...
@@ -207,6 +207,10 @@ USerStorageXML& operator >> (USerStorageXML& storage, std::pair<T1,T2> &data)
}
// Map-
#ifdef _MSC_VER
#pragma warning( push )
#pragma warning (disable: 4700)
#endif
template
<
typename
T1
,
typename
T2
>
USerStorageXML
&
operator
<<
(
USerStorageXML
&
storage
,
const
std
::
map
<
T1
,
T2
>
&
data
)
{
...
...
@@ -246,6 +250,9 @@ USerStorageXML& operator << (USerStorageXML& storage, const std::map<T1,T2> &dat
return
storage
;
}
#ifdef _MSC_VER
#pragma warning ( pop )
#endif
template
<
typename
T1
,
typename
T2
>
USerStorageXML
&
operator
>>
(
USerStorageXML
&
storage
,
std
::
map
<
T1
,
T2
>
&
data
)
...
...
@@ -280,6 +287,10 @@ USerStorageXML& operator >> (USerStorageXML& storage, std::map<T1,T2> &data)
return
storage
;
}
#ifdef _MSC_VER
#pragma warning( push )
#pragma warning (disable: 4700)
#endif
//
template
<
typename
T
>
USerStorageXML
&
operator
<<
(
USerStorageXML
&
storage
,
const
std
::
list
<
T
>
&
data
)
...
...
@@ -313,6 +324,9 @@ USerStorageXML& operator << (USerStorageXML& storage, const std::list<T> &data)
return
storage
;
}
#ifdef _MSC_VER
#pragma warning ( pop )
#endif
template
<
typename
T
>
USerStorageXML
&
operator
>>
(
USerStorageXML
&
storage
,
std
::
list
<
T
>
&
data
)
...
...
@@ -357,10 +371,13 @@ RDK_LIB_TYPE USerStorageXML& operator >> (USerStorageXML& storage, std::vector<d
RDK_LIB_TYPE
USerStorageXML
&
operator
<<
(
USerStorageXML
&
storage
,
const
std
::
vector
<
int
>
&
data
);
RDK_LIB_TYPE
USerStorageXML
&
operator
>>
(
USerStorageXML
&
storage
,
std
::
vector
<
int
>
&
data
);
#ifdef _MSC_VER
#pragma warning( push )
#pragma warning (disable: 4700)
#endif
template
<
typename
T
>
USerStorageXML
&
operator
<<
(
USerStorageXML
&
storage
,
const
std
::
vector
<
T
>
&
data
)
{
storage
.
SetNodeAttribute
(
"Type"
,
"std::vector"
);
//
...
...
@@ -443,6 +460,9 @@ USerStorageXML& operator << (USerStorageXML& storage, const std::vector<T> &data
return
storage
;
}
#ifdef _MSC_VER
#pragma warning ( pop )
#endif
template
<
typename
T
>
USerStorageXML
&
operator
>>
(
USerStorageXML
&
storage
,
std
::
vector
<
T
>
&
data
)
...
...
GUI/Qt/UCreateConfigurationWizardWidget.cpp
View file @
7b54ee07
...
...
@@ -411,7 +411,7 @@ void UCreateConfigurationWizardWidget::onMSLoadModelFromModelsCollection(bool ch
{
QString
tmp
=
QString
::
fromStdString
(
n
.
XMLName
);
QTextCodec
*
codec
=
QTextCodec
::
codecForName
(
"Windows-1251"
);
QByteArray
byteArray
(
n
.
XMLDescription
.
c_str
(),
n
.
XMLDescription
.
length
());
QByteArray
byteArray
(
n
.
XMLDescription
.
c_str
(),
int
(
n
.
XMLDescription
.
length
())
)
;
QString
utf8Str
=
codec
->
toUnicode
(
byteArray
);
tmp
=
tmp
+
" "
+
utf8Str
;
ModelsFromFileData
.
push_back
(
tmp
);
...
...
GUI/Qt/UGraphWidget.cpp
View file @
7b54ee07
...
...
@@ -144,8 +144,8 @@ void UGraphWidget::setCurrentItem(int myCurrentItem)
void
UGraphWidget
::
AUpdateInterface
()
{
size_
t
n
=
graphPainter
->
getSize
();
for
(
size_
t
i
=
0
;
i
<
n
;
i
++
)
in
t
n
=
graphPainter
->
getSize
();
for
(
in
t
i
=
0
;
i
<
n
;
i
++
)
{
const
TSingleGraph
&
current_graph
=
graphPainter
->
getGraph
(
i
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment