Commit 30a451d8 authored by IOhannes m zmölnig's avatar IOhannes m zmölnig
Browse files

RTE::getName() and RTE::findFile() are member methods not static

so there's little use to invoke RTE::getRuntimeEnvironment()
parent 5180a5e8
...@@ -59,10 +59,7 @@ typedef void (*rte_getversion_t)(int*major,int*minor,int*bugfix); ...@@ -59,10 +59,7 @@ typedef void (*rte_getversion_t)(int*major,int*minor,int*bugfix);
const std::string RTE :: getVersion(unsigned int&major, unsigned int&minor) { const std::string RTE :: getVersion(unsigned int&major, unsigned int&minor) {
static rte_getversion_t rte_getversion=NULL; static rte_getversion_t rte_getversion=NULL;
if(NULL==rte_getversion) { if(NULL==rte_getversion) {
gem::RTE::RTE*rte=gem::RTE::RTE::getRuntimeEnvironment(); rte_getversion=(rte_getversion_t)this->getFunction("sys_getversion");
if(rte) {
rte_getversion=(rte_getversion_t)rte->getFunction("sys_getversion");
}
} }
if(rte_getversion) { if(rte_getversion) {
...@@ -123,10 +120,7 @@ std::string RTE::findFile(const std::string&f, const std::string&e, const void* ...@@ -123,10 +120,7 @@ std::string RTE::findFile(const std::string&f, const std::string&e, const void*
buf2, &bufptr, MAXPDSTRING, 1))>=0){ buf2, &bufptr, MAXPDSTRING, 1))>=0){
static close_t rte_close=NULL; static close_t rte_close=NULL;
if(NULL==rte_close) { if(NULL==rte_close) {
RTE*rte=RTE::getRuntimeEnvironment(); rte_close=(close_t)this->getFunction("sys_close");
if(rte) {
rte_close=(close_t)rte->getFunction("sys_close");
}
if(NULL==rte_close) { if(NULL==rte_close) {
rte_close=close; rte_close=close;
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment