diff --git a/fpga/include/villas/fpga/card.hpp b/fpga/include/villas/fpga/card.hpp index 20c89876d..4d838559c 100644 --- a/fpga/include/villas/fpga/card.hpp +++ b/fpga/include/villas/fpga/card.hpp @@ -75,7 +75,7 @@ public: bool reset() { return true; } void dump() { } - ip::IpCore* lookupIp(std::string name) const; + ip::IpCore* lookupIp(const std::string& name) const; ip::IpCoreList ips; ///< IPs located on this FPGA card diff --git a/fpga/lib/card.cpp b/fpga/lib/card.cpp index da0e2d830..b15328566 100644 --- a/fpga/lib/card.cpp +++ b/fpga/lib/card.cpp @@ -132,7 +132,8 @@ fpga::PCIeCardFactory::create() ip::IpCore* -PCIeCard::lookupIp(std::string name) const { +PCIeCard::lookupIp(const std::string& name) const +{ for(auto& ip : ips) { if(*ip == name) { return ip.get();