Commit efa2905c authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

oleaut32: Use better naming to clarify copy direction.

parent 2ce06e57
...@@ -266,20 +266,19 @@ static HRESULT WINAPI IRecordInfoImpl_RecordClear(IRecordInfo *iface, PVOID pvEx ...@@ -266,20 +266,19 @@ static HRESULT WINAPI IRecordInfoImpl_RecordClear(IRecordInfo *iface, PVOID pvEx
return S_OK; return S_OK;
} }
static HRESULT WINAPI IRecordInfoImpl_RecordCopy(IRecordInfo *iface, PVOID pvExisting, static HRESULT WINAPI IRecordInfoImpl_RecordCopy(IRecordInfo *iface, void *src_rec, void *dest_rec)
PVOID pvNew)
{ {
IRecordInfoImpl *This = impl_from_IRecordInfo(iface); IRecordInfoImpl *This = impl_from_IRecordInfo(iface);
HRESULT hr = S_OK; HRESULT hr = S_OK;
int i; int i;
TRACE("(%p)->(%p %p)\n", This, pvExisting, pvNew); TRACE("(%p)->(%p %p)\n", This, src_rec, dest_rec);
if(!pvExisting || !pvNew) if(!src_rec || !dest_rec)
return E_INVALIDARG; return E_INVALIDARG;
/* release already stored data */ /* release already stored data */
IRecordInfo_RecordClear(iface, pvNew); IRecordInfo_RecordClear(iface, dest_rec);
for (i = 0; i < This->n_vars; i++) for (i = 0; i < This->n_vars; i++)
{ {
...@@ -290,8 +289,8 @@ static HRESULT WINAPI IRecordInfoImpl_RecordCopy(IRecordInfo *iface, PVOID pvExi ...@@ -290,8 +289,8 @@ static HRESULT WINAPI IRecordInfoImpl_RecordCopy(IRecordInfo *iface, PVOID pvExi
continue; continue;
} }
src = ((BYTE*)pvExisting) + This->fields[i].offset; src = ((BYTE*)src_rec) + This->fields[i].offset;
dest = ((BYTE*)pvNew) + This->fields[i].offset; dest = ((BYTE*)dest_rec) + This->fields[i].offset;
switch (This->fields[i].vt) switch (This->fields[i].vt)
{ {
case VT_BSTR: case VT_BSTR:
...@@ -333,7 +332,7 @@ static HRESULT WINAPI IRecordInfoImpl_RecordCopy(IRecordInfo *iface, PVOID pvExi ...@@ -333,7 +332,7 @@ static HRESULT WINAPI IRecordInfoImpl_RecordCopy(IRecordInfo *iface, PVOID pvExi
} }
if (FAILED(hr)) if (FAILED(hr))
IRecordInfo_RecordClear(iface, pvNew); IRecordInfo_RecordClear(iface, dest_rec);
return hr; return hr;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment