Skip to content

Commit

Permalink
Fix hidden overloaded virtual function
Browse files Browse the repository at this point in the history
'RemoteSchemaDocumentProvider::GetRemoteDocument' and
'SchemaDocumentProvider::GetRemoteDocument' hide the vitual function
'IGenericRemoteSchemaDocumentProvider::GetRemoteDocument'.

Add using statement to fix overloaded-virtual warnings.
  • Loading branch information
EstherWx committed Dec 6, 2023
1 parent f9d5341 commit 1c510ac
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions test/unittest/schematest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2155,6 +2155,7 @@ class RemoteSchemaDocumentProvider : public IGenericRemoteSchemaDocumentProvider
delete sd_[i];
}

using IGenericRemoteSchemaDocumentProvider<SchemaDocumentType>::GetRemoteDocument;
virtual const SchemaDocumentType* GetRemoteDocument(const char* uri, SizeType length) {
//printf("GetRemoteDocument : %s\n", uri);
for (size_t i = 0; i < kCount; i++)
Expand Down Expand Up @@ -2650,6 +2651,7 @@ TEST(SchemaValidator, Ref_remote_issue1210) {

public:
SchemaDocumentProvider(SchemaDocument** collection) : collection(collection) { }
using IGenericRemoteSchemaDocumentProvider::GetRemoteDocument;
virtual const SchemaDocument* GetRemoteDocument(const char* uri, SizeType length) {
int i = 0;
while (collection[i] && SchemaDocument::GValue(uri, length) != collection[i]->GetURI()) ++i;
Expand Down

0 comments on commit 1c510ac

Please sign in to comment.