Skip to content

Commit

Permalink
VSTPlugin-Win.cpp:
Browse files Browse the repository at this point in the history
Replace "NULL" with "nullptr" based on Vs2015 recommendation.
  • Loading branch information
c3r1c3 committed Jan 19, 2017
1 parent 92167c2 commit 95695b3
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions win/VSTPlugin-win.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,26 +5,26 @@
#include <windows.h>

AEffect* VSTPlugin::loadEffect() {
AEffect *plugin = NULL;
AEffect *plugin = nullptr;

wchar_t *wpath;
os_utf8_to_wcs_ptr(pluginPath.c_str(), 0, &wpath);
dllHandle = LoadLibraryW(wpath);
bfree(wpath);
if(dllHandle == NULL) {
if(dllHandle == nullptr) {
printf("Failed trying to load VST from '%s', error %d\n",
pluginPath, GetLastError());
return NULL;
return nullptr;
}

vstPluginMain mainEntryPoint =
(vstPluginMain)GetProcAddress(dllHandle, "VSTPluginMain");

if (!mainEntryPoint) {
return NULL;
return nullptr;
}

// Instantiate the plugin
// Instantiate the plug-in
plugin = mainEntryPoint(hostCallback_static);
plugin->user = this;
return plugin;
Expand All @@ -33,6 +33,6 @@ AEffect* VSTPlugin::loadEffect() {
void VSTPlugin::unloadLibrary() {
if (dllHandle) {
FreeLibrary(dllHandle);
dllHandle = NULL;
dllHandle = nullptr;
}
}

0 comments on commit 95695b3

Please sign in to comment.