diff options
author | David Robillard <d@drobilla.net> | 2010-02-04 17:21:44 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2010-02-04 17:21:44 +0000 |
commit | 7c19aa2a97c1e19b27b66c58a84c46489101950e (patch) | |
tree | 72b2fac98b6f69bc16770194900c0e0bec86311b /src/engine/NodeFactory.cpp | |
parent | b8ef9bff8a46a682f68585aad7587bf081e8b7f8 (diff) | |
download | ingen-7c19aa2a97c1e19b27b66c58a84c46489101950e.tar.gz ingen-7c19aa2a97c1e19b27b66c58a84c46489101950e.tar.bz2 ingen-7c19aa2a97c1e19b27b66c58a84c46489101950e.zip |
Use std::string::empty where possible (faster, and less prone to C string errors).
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@2420 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/engine/NodeFactory.cpp')
-rw-r--r-- | src/engine/NodeFactory.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/engine/NodeFactory.cpp b/src/engine/NodeFactory.cpp index de321077..335feb26 100644 --- a/src/engine/NodeFactory.cpp +++ b/src/engine/NodeFactory.cpp @@ -86,7 +86,7 @@ NodeFactory::plugin(const Raul::URI& uri) PluginImpl* NodeFactory::plugin(const string& type, const string& lib, const string& label) { - if (type != "LADSPA" || lib == "" || label == "") + if (type != "LADSPA" || lib.empty() || label.empty()) return NULL; #ifdef HAVE_LADSPA_H @@ -206,12 +206,12 @@ NodeFactory::load_ladspa_plugins() } // Yep, this should use an sstream alright.. - while (ladspa_path != "") { + while (!ladspa_path.empty()) { const string dir = ladspa_path.substr(0, ladspa_path.find(':')); if (ladspa_path.find(':') != string::npos) ladspa_path = ladspa_path.substr(ladspa_path.find(':')+1); else - ladspa_path = ""; + ladspa_path.clear(); DIR* pdir = opendir(dir.c_str()); if (pdir == NULL) |