Skip to content

Commit 01b4fa4

Browse files
committed
Fixed the warnings in the test C++ for C# only.
Signed-off-by: Dimitar Dobrev <[email protected]>
1 parent 72709dc commit 01b4fa4

File tree

5 files changed

+18
-13
lines changed

5 files changed

+18
-13
lines changed

tests/CSharp/AnotherUnit.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ struct DLL_API ForwardDeclaredStruct;
3636
struct DLL_API DuplicateDeclaredStruct;
3737

3838
template <typename T>
39-
class TemplateInAnotherUnit
39+
class DLL_API TemplateInAnotherUnit
4040
{
4141
T field;
4242
};

tests/CSharp/CSharp.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1425,8 +1425,7 @@ int funcWithTypedefedFuncPtrAsParam(typedefedFuncPtr* func)
14251425

14261426
typedefedFuncPtr* TestDuplicateDelegate::testDuplicateDelegate(int a)
14271427
{
1428-
typedefedFuncPtr* func;
1429-
return func;
1428+
return 0;
14301429
}
14311430

14321431
void InlineNamespace::FunctionInsideInlineNamespace()

tests/CSharp/CSharpTemplates.h

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ class TwoTemplateArgs
270270
};
271271

272272
template <typename T, typename D = IndependentFields<T>>
273-
class HasDefaultTemplateArgument
273+
class DLL_API HasDefaultTemplateArgument
274274
{
275275
public:
276276
HasDefaultTemplateArgument();
@@ -288,7 +288,7 @@ class HasDefaultTemplateArgument
288288
};
289289

290290
template <>
291-
class HasDefaultTemplateArgument<bool, bool>
291+
class DLL_API HasDefaultTemplateArgument<bool, bool>
292292
{
293293
public:
294294
HasDefaultTemplateArgument();
@@ -421,6 +421,12 @@ T& TemplateWithIndexer<T>::operator[](int i)
421421
return t[0];
422422
}
423423

424+
template <typename T>
425+
T& TemplateWithIndexer<T>::operator[](const T& key)
426+
{
427+
return t[0];
428+
}
429+
424430
template <typename T>
425431
T& TemplateWithIndexer<T>::operator[](const char* string)
426432
{
@@ -491,15 +497,16 @@ class DLL_API HasVirtualTemplate
491497
HasDefaultTemplateArgument<bool, bool> explicitSpecialization;
492498
};
493499

494-
class DLL_API SpecializedInterfaceForMap : InternalWithExtension<char>
500+
class DLL_API SpecializedInterfaceForMap : public InternalWithExtension<char>
495501
{
496502
public:
497503
SpecializedInterfaceForMap();
498504
~SpecializedInterfaceForMap();
499505
};
500506

501-
class DLL_API HasSpecializationForSecondaryBase : T1, DependentValueFields<int>, IndependentFields<int>,
502-
InternalWithExtension<float>, DependentPointerFields<DependentValueFields<int>>
507+
class DLL_API HasSpecializationForSecondaryBase : public DependentValueFields<int>,
508+
public IndependentFields<int>,
509+
public InternalWithExtension<float>
503510
{
504511
public:
505512
HasSpecializationForSecondaryBase();
@@ -583,7 +590,7 @@ struct MapResultType<InputSequence<T>, MapFunctor>
583590
typedef InputSequence<typename LazyResultType<MapFunctor>::Type> ResultType;
584591
};
585592

586-
class RegularDynamic
593+
class DLL_API RegularDynamic
587594
{
588595
public:
589596
RegularDynamic();
@@ -592,7 +599,7 @@ class RegularDynamic
592599
};
593600

594601
template<typename T>
595-
class TemplateDerivedFromRegularDynamic : public RegularDynamic
602+
class DLL_API TemplateDerivedFromRegularDynamic : public RegularDynamic
596603
{
597604
public:
598605
TemplateDerivedFromRegularDynamic();

tests/NamespacesBase/NamespacesBase.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ namespace OverlappingNamespace
1111
green,
1212
};
1313

14-
class InBaseLib
14+
class DLL_API InBaseLib
1515
{
1616
public:
1717
InBaseLib()
@@ -60,7 +60,7 @@ class TemplateClass
6060
};
6161

6262
template <typename T>
63-
class TemplateWithIndependentFields
63+
class DLL_API TemplateWithIndependentFields
6464
{
6565
public:
6666
void useDependentPointer(const T* t);

tests/NamespacesDerived/NamespacesDerived.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
// Test whether qualified names turn out right.
66
namespace OverlappingNamespace
77
{
8-
98
class InDerivedLib
109
{
1110
public:

0 commit comments

Comments
 (0)