rainmeter/rainmeter-plugin-sdk

C++ header improvement

wojciechsura opened this issue · 0 comments

I have suggestion to modify the API header in the following way:

#ifndef UNIT_TESTS
	#ifdef LIBRARY_EXPORTS
	#define LIBRARY_EXPORT EXTERN_C
	#else
	#define LIBRARY_EXPORT EXTERN_C __declspec(dllimport)
	#endif // LIBRARY_EXPORTS

	#define PLUGIN_EXPORT EXTERN_C __declspec(dllexport)
#else
	#define LIBRARY_EXPORT
	#define PLUGIN_EXPORT
#endif

This simplifies creating mock API implementation to unit test the measure by removing all library method annotations.