Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make a port.cpp, put the static PortName function there to silence co…
…mpile warnings
- Loading branch information
Matt Johnson
committed
Mar 29, 2012
1 parent
12f21ea
commit e8f7931
Showing
3 changed files
with
22 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#include "port/port.h" | ||
#include <string> | ||
#include <sstream> | ||
#include <iomanip> | ||
|
||
//FIXME Use a function naming convention, not a class naming convention | ||
std::string PortName(std::string parent, int id, std::string suffix, int index) { | ||
|
||
std::stringstream port_name; | ||
port_name << parent << "[" << std::setw(4) << id << "]." << suffix; | ||
if (index >= 0) { | ||
port_name << "[" << std::setw(4) << index << "]"; | ||
} | ||
return port_name.str(); | ||
|
||
} | ||
|