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
612d12b3
Commit
612d12b3
authored
Oct 25, 2015
by
Pavel Vainerman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(IOBase): [ fixed ] error: overflow in implicit constant conversion [-Werror=overflow]
parent
8514ba31
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
5 deletions
+20
-5
IOBase.h
extensions/include/IOBase.h
+1
-1
IOBase.cc
extensions/lib/IOBase.cc
+19
-4
No files found.
extensions/include/IOBase.h
View file @
612d12b3
...
...
@@ -173,7 +173,7 @@ struct IOBase
// helpes
static
std
::
string
initProp
(
UniXML
::
iterator
&
it
,
const
std
::
string
&
prop
,
const
std
::
string
&
prefix
,
bool
prefonly
,
const
std
::
string
&
defval
=
""
);
static
int
initIntProp
(
UniXML
::
iterator
&
it
,
const
std
::
string
&
prop
,
const
std
::
string
&
prefix
,
bool
prefonly
,
const
int
defval
=
0
);
static
timeout_t
initTimeoutProp
(
UniXML
::
iterator
&
it
,
const
std
::
string
&
prop
,
const
std
::
string
&
prefix
,
bool
prefonly
,
const
timeout_t
defval
);
};
// -----------------------------------------------------------------------------
...
...
extensions/lib/IOBase.cc
View file @
612d12b3
...
...
@@ -510,6 +510,22 @@ int IOBase::initIntProp( UniXML::iterator& it, const std::string& prop, const st
return
defval
;
}
// -----------------------------------------------------------------------------
timeout_t
IOBase
::
initTimeoutProp
(
UniXML
::
iterator
&
it
,
const
std
::
string
&
prop
,
const
std
::
string
&
prefix
,
bool
prefonly
,
const
timeout_t
defval
)
{
string
pp
(
prefix
+
prop
);
if
(
!
it
.
getProp
(
pp
).
empty
()
)
return
it
.
getIntProp
(
pp
);
if
(
prefonly
)
return
defval
;
if
(
!
it
.
getProp
(
prop
).
empty
()
)
return
it
.
getIntProp
(
prop
);
return
defval
;
}
// -----------------------------------------------------------------------------
bool
IOBase
::
initItem
(
IOBase
*
b
,
UniXML
::
iterator
&
it
,
const
std
::
shared_ptr
<
SMInterface
>&
shm
,
const
std
::
string
&
prefix
,
bool
init_prefix_only
,
std
::
shared_ptr
<
DebugStream
>
dlog
,
std
::
string
myname
,
...
...
@@ -550,16 +566,15 @@ bool IOBase::initItem( IOBase* b, UniXML::iterator& it, const std::shared_ptr<SM
b
->
breaklim
=
initIntProp
(
it
,
"breaklim"
,
prefix
,
init_prefix_only
);
b
->
rawdata
=
initIntProp
(
it
,
"rawdata"
,
prefix
,
init_prefix_only
);
timeout_t
d_msec
=
init
In
tProp
(
it
,
"debouncedelay"
,
prefix
,
init_prefix_only
,
UniSetTimer
::
WaitUpTime
);
timeout_t
d_msec
=
init
Timeou
tProp
(
it
,
"debouncedelay"
,
prefix
,
init_prefix_only
,
UniSetTimer
::
WaitUpTime
);
b
->
ptDebounce
.
setTiming
(
d_msec
);
timeout_t
d_on_msec
=
init
In
tProp
(
it
,
"ondelay"
,
prefix
,
init_prefix_only
,
UniSetTimer
::
WaitUpTime
);
timeout_t
d_on_msec
=
init
Timeou
tProp
(
it
,
"ondelay"
,
prefix
,
init_prefix_only
,
UniSetTimer
::
WaitUpTime
);
b
->
ptOnDelay
.
setTiming
(
d_on_msec
);
timeout_t
d_off_msec
=
init
In
tProp
(
it
,
"offdelay"
,
prefix
,
init_prefix_only
,
UniSetTimer
::
WaitUpTime
);
timeout_t
d_off_msec
=
init
Timeou
tProp
(
it
,
"offdelay"
,
prefix
,
init_prefix_only
,
UniSetTimer
::
WaitUpTime
);
b
->
ptOffDelay
.
setTiming
(
d_off_msec
);
if
(
dlog
&&
d_msec
!=
UniSetTimer
::
WaitUpTime
&&
d_on_msec
!=
UniSetTimer
::
WaitUpTime
&&
d_off_msec
!=
UniSetTimer
::
WaitUpTime
)
...
...
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