Skip to content

Commit 95695b3

Browse files
committed
VSTPlugin-Win.cpp:
Replace "NULL" with "nullptr" based on Vs2015 recommendation.
1 parent 92167c2 commit 95695b3

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

win/VSTPlugin-win.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,26 +5,26 @@
55
#include <windows.h>
66

77
AEffect* VSTPlugin::loadEffect() {
8-
AEffect *plugin = NULL;
8+
AEffect *plugin = nullptr;
99

1010
wchar_t *wpath;
1111
os_utf8_to_wcs_ptr(pluginPath.c_str(), 0, &wpath);
1212
dllHandle = LoadLibraryW(wpath);
1313
bfree(wpath);
14-
if(dllHandle == NULL) {
14+
if(dllHandle == nullptr) {
1515
printf("Failed trying to load VST from '%s', error %d\n",
1616
pluginPath, GetLastError());
17-
return NULL;
17+
return nullptr;
1818
}
1919

2020
vstPluginMain mainEntryPoint =
2121
(vstPluginMain)GetProcAddress(dllHandle, "VSTPluginMain");
2222

2323
if (!mainEntryPoint) {
24-
return NULL;
24+
return nullptr;
2525
}
2626

27-
// Instantiate the plugin
27+
// Instantiate the plug-in
2828
plugin = mainEntryPoint(hostCallback_static);
2929
plugin->user = this;
3030
return plugin;
@@ -33,6 +33,6 @@ AEffect* VSTPlugin::loadEffect() {
3333
void VSTPlugin::unloadLibrary() {
3434
if (dllHandle) {
3535
FreeLibrary(dllHandle);
36-
dllHandle = NULL;
36+
dllHandle = nullptr;
3737
}
3838
}

0 commit comments

Comments
 (0)