Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
0575a4b2
Commit
0575a4b2
authored
Dec 09, 2016
by
Nikolay Sivov
Committed by
Alexandre Julliard
Dec 09, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
xmllite: Use a helper to move to first attribute to avoid extra traces.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
65ee2b73
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
7 deletions
+15
-7
reader.c
dlls/xmllite/reader.c
+15
-7
No files found.
dlls/xmllite/reader.c
View file @
0575a4b2
...
...
@@ -2790,18 +2790,26 @@ static HRESULT WINAPI xmlreader_GetNodeType(IXmlReader* iface, XmlNodeType *node
return
This
->
state
==
XmlReadState_Closed
?
S_FALSE
:
S_OK
;
}
static
HRESULT
reader_move_to_first_attribute
(
xmlreader
*
reader
)
{
if
(
!
reader
->
attr_count
)
return
S_FALSE
;
reader
->
attr
=
LIST_ENTRY
(
list_head
(
&
reader
->
attrs
),
struct
attribute
,
entry
);
reader_set_strvalue
(
reader
,
StringValue_Prefix
,
&
reader
->
attr
->
prefix
);
reader_set_strvalue
(
reader
,
StringValue_LocalName
,
&
reader
->
attr
->
localname
);
reader_set_strvalue
(
reader
,
StringValue_Value
,
&
reader
->
attr
->
value
);
return
S_OK
;
}
static
HRESULT
WINAPI
xmlreader_MoveToFirstAttribute
(
IXmlReader
*
iface
)
{
xmlreader
*
This
=
impl_from_IXmlReader
(
iface
);
TRACE
(
"(%p)
\n
"
,
This
);
if
(
!
This
->
attr_count
)
return
S_FALSE
;
This
->
attr
=
LIST_ENTRY
(
list_head
(
&
This
->
attrs
),
struct
attribute
,
entry
);
reader_set_strvalue
(
This
,
StringValue_LocalName
,
&
This
->
attr
->
localname
);
reader_set_strvalue
(
This
,
StringValue_Value
,
&
This
->
attr
->
value
);
return
S_OK
;
return
reader_move_to_first_attribute
(
This
);
}
static
HRESULT
WINAPI
xmlreader_MoveToNextAttribute
(
IXmlReader
*
iface
)
...
...
@@ -2814,7 +2822,7 @@ static HRESULT WINAPI xmlreader_MoveToNextAttribute(IXmlReader* iface)
if
(
!
This
->
attr_count
)
return
S_FALSE
;
if
(
!
This
->
attr
)
return
IXmlReader_MoveToFirstAttribute
(
iface
);
return
reader_move_to_first_attribute
(
This
);
next
=
list_next
(
&
This
->
attrs
,
&
This
->
attr
->
entry
);
if
(
next
)
...
...
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