Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
U
uniset2
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
UniSet project repositories
uniset2
Commits
d3d99ffe
Commit
d3d99ffe
authored
Nov 10, 2014
by
Pavel Vainerman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Применил где можно emplace_back вместо push_back. (c++11).
parent
4956d41e
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
6 additions
and
7 deletions
+6
-7
RRDServer.cc
extensions/RRDServer/RRDServer.cc
+1
-2
Calibration.cc
extensions/lib/Calibration.cc
+1
-1
MTR.cc
extensions/lib/MTR.cc
+1
-1
NCRestorer_XML.cc
src/Processes/NCRestorer_XML.cc
+2
-2
LT_Object.cc
src/Various/LT_Object.cc
+1
-1
No files found.
extensions/RRDServer/RRDServer.cc
View file @
d3d99ffe
...
@@ -199,8 +199,7 @@ void RRDServer::initRRD( xmlNode* cnode, int tmID )
...
@@ -199,8 +199,7 @@ void RRDServer::initRRD( xmlNode* cnode, int tmID )
delete
[]
argv
;
delete
[]
argv
;
RRDInfo
rrd
(
fname
,
tmID
,
rrdstep
,
dsmap
);
rrdlist
.
emplace_back
(
fname
,
tmID
,
rrdstep
,
dsmap
);
rrdlist
.
push_back
(
rrd
);
}
}
/* catch( Exception& ex )
/* catch( Exception& ex )
{
{
...
...
extensions/lib/Calibration.cc
View file @
d3d99ffe
...
@@ -328,7 +328,7 @@ void Calibration::setCacheSize( unsigned int sz )
...
@@ -328,7 +328,7 @@ void Calibration::setCacheSize( unsigned int sz )
void
Calibration
::
insertToCache
(
const
long
raw
,
const
long
val
)
void
Calibration
::
insertToCache
(
const
long
raw
,
const
long
val
)
{
{
cache
.
pop_back
();
// удаляем последний элемент (как самый неиспользуемый)
cache
.
pop_back
();
// удаляем последний элемент (как самый неиспользуемый)
cache
.
push_back
(
CacheInfo
(
raw
,
val
)
);
// добавляем в конец..
cache
.
emplace_back
(
raw
,
val
);
// добавляем в конец..
sort
(
cache
.
begin
(),
cache
.
end
());
// пересортируем в порядке уменьшения обращений (см. CacheInfo::operator< )
sort
(
cache
.
begin
(),
cache
.
end
());
// пересортируем в порядке уменьшения обращений (см. CacheInfo::operator< )
}
}
// ----------------------------------------------------------------------------
// ----------------------------------------------------------------------------
...
...
extensions/lib/MTR.cc
View file @
d3d99ffe
...
@@ -280,7 +280,7 @@ DataMap read_confile( const std::string& f )
...
@@ -280,7 +280,7 @@ DataMap read_confile( const std::string& f )
tmp
=
"0x"
+
tmp
;
tmp
=
"0x"
+
tmp
;
// cout << "find data=" << ModbusRTU::str2mbData(tmp)
// cout << "find data=" << ModbusRTU::str2mbData(tmp)
// << "(" << tmp << ")" << endl;
// << "(" << tmp << ")" << endl;
dlst
.
push
_back
(
ModbusRTU
::
str2mbData
(
tmp
)
);
dlst
.
emplace
_back
(
ModbusRTU
::
str2mbData
(
tmp
)
);
}
}
}
}
...
...
src/Processes/NCRestorer_XML.cc
View file @
d3d99ffe
...
@@ -430,8 +430,8 @@ bool NCRestorer_XML::getConsumerList( const UniXML& xml, xmlNode* node,
...
@@ -430,8 +430,8 @@ bool NCRestorer_XML::getConsumerList( const UniXML& xml, xmlNode* node,
if
(
!
getConsumerInfo
(
it
,
ci
.
id
,
ci
.
node
)
)
if
(
!
getConsumerInfo
(
it
,
ci
.
id
,
ci
.
node
)
)
continue
;
continue
;
IONotifyController
::
ConsumerInfoExt
cinf
(
ci
);
//
IONotifyController::ConsumerInfoExt cinf(ci);
lst
.
clst
.
push_back
(
cinf
);
lst
.
clst
.
emplace_back
(
ci
);
cslot
(
xml
,
it
,
node
);
cslot
(
xml
,
it
,
node
);
}
}
...
...
src/Various/LT_Object.cc
View file @
d3d99ffe
...
@@ -152,7 +152,7 @@ timeout_t LT_Object::askTimer( UniSetTypes::TimerId timerid, timeout_t timeMS, c
...
@@ -152,7 +152,7 @@ timeout_t LT_Object::askTimer( UniSetTypes::TimerId timerid, timeout_t timeMS, c
}
}
// TimerInfo newti(timerid, timeMS, ticks, p);
// TimerInfo newti(timerid, timeMS, ticks, p);
tlst
.
push_back
(
std
::
move
(
TimerInfo
(
timerid
,
timeMS
,
ticks
,
p
))
);
tlst
.
emplace_back
(
timerid
,
timeMS
,
ticks
,
p
);
}
// unlock
}
// unlock
uinfo
<<
"(LT_askTimer): поступил заказ на таймер(id="
<<
timerid
<<
") "
<<
timeMS
<<
" [мс]
\n
"
;
uinfo
<<
"(LT_askTimer): поступил заказ на таймер(id="
<<
timerid
<<
") "
<<
timeMS
<<
" [мс]
\n
"
;
...
...
Write
Preview
Markdown
is supported
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