1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/node/ synced 2025-03-09 00:00:00 +01:00

lib/card: pass string as const reference to lookupIp()

This commit is contained in:
Daniel Krebs 2018-02-13 13:45:01 +01:00 committed by Steffen Vogel
parent 95e29f2706
commit c3382b9e18
2 changed files with 3 additions and 2 deletions

View file

@ -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

View file

@ -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();