MCPcopy Create free account
hub / github.com/devosoft/avida / GetResourceByName

Method GetResourceByName

avida-core/source/main/cResourceCount.cc:867–881  ·  view source on GitHub ↗

* TODO: This is a duplicate of GetResourceCountID() * Follow the same steps to get rid of it. */

Source from the content-addressed store, hash-verified

865 * Follow the same steps to get rid of it.
866 */
867int cResourceCount::GetResourceByName(cString name) const
868{
869 int result = -1;
870
871 for(int i = 0; i < resource_name.GetSize(); i++)
872 {
873 if(resource_name[i] == name)
874 {
875 result = i;
876 }
877 }
878
879 return result;
880
881}
882
883

Callers 3

ProcessMethod · 0.80
Inst_ResMoveHeadMethod · 0.80
Inst_ResJumpHeadMethod · 0.80

Calls 1

GetSizeMethod · 0.45

Tested by

no test coverage detected