Skip to content

Commit 147994a

Browse files
committed
Removed unused code.
1 parent 00748b3 commit 147994a

File tree

2 files changed

+4
-15
lines changed

2 files changed

+4
-15
lines changed

src/codegen/c-sigprinter.cpp

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ std::string CSigPrinter::PrintPhysicalToRaw(const SignalDescriptor_t* sig, const
6161
retstr += StrPrint("#define %s_%s_CovFactor (%d)\n", drvname.c_str(), sig->Name.c_str(), (int32_t)sig->Factor);
6262

6363
retstr += StrPrint("#define %s_%s_toS(x) ( (%s) ", drvname.c_str(), sig->Name.c_str(),
64-
PrintType((uint8_t)sig->Type).c_str());
64+
PrintType((uint8_t)sig->Type).c_str());
6565

6666
if (sig->IsDoubleSig)
6767
{
@@ -114,15 +114,6 @@ std::string CSigPrinter::PrintPhysicalToRaw(const SignalDescriptor_t* sig, const
114114
return retstr;
115115
}
116116

117-
// This function determines what type will have struct
118-
// field for the @signal. It saves the <stdint> name
119-
std::string CSigPrinter::GetSignalType(const SignalDescriptor_t& signal)
120-
{
121-
std::string ret = "";
122-
123-
return ret;
124-
}
125-
126117
int32_t CSigPrinter::BuildCConvertExprs(CiExpr_t* msgprinter)
127118
{
128119
int32_t ret = 0;
@@ -183,7 +174,7 @@ std::string CSigPrinter::PrintSignalExpr(const SignalDescriptor_t* sig, std::vec
183174
std::string tosigexpr;
184175

185176
uint16_t startb = (uint16_t)((sig->Order == BitLayout::kIntel) ?
186-
(sig->StartBit + (sig->LengthBit - 1)) : (sig->StartBit));
177+
(sig->StartBit + (sig->LengthBit - 1)) : (sig->StartBit));
187178

188179
if (startb > 63)
189180
startb = 63;
@@ -225,7 +216,7 @@ std::string CSigPrinter::PrintSignalExpr(const SignalDescriptor_t* sig, std::vec
225216
tosigexpr += workbuff;
226217

227218
snprintf(workbuff, WBUFF_LEN, "((_m->%s >> %d) & (%s))", sig->Name.c_str(), slen,
228-
msk[bbc].c_str());
219+
msk[bbc].c_str());
229220
AppendToByteLine(to_bytes[bn], workbuff);
230221

231222
while ((slen - 8) >= 0)
@@ -271,7 +262,7 @@ std::string CSigPrinter::PrintSignalExpr(const SignalDescriptor_t* sig, std::vec
271262
tosigexpr += workbuff;
272263

273264
snprintf(workbuff, WBUFF_LEN, "((_m->%s & (%s)) << %d)", sig->Name.c_str(), msk[slen].c_str(),
274-
8 - slen);
265+
8 - slen);
275266
AppendToByteLine(to_bytes[bn], workbuff);
276267
}
277268
}

src/codegen/c-sigprinter.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@ class CSigPrinter {
1616
std::vector<CiExpr_t*> sigs_expr;
1717

1818
private:
19-
std::string GetSignalType(const SignalDescriptor_t& signal);
20-
2119
int32_t BuildCConvertExprs(CiExpr_t* msg);
2220

2321
std::string PrintSignalExpr(const SignalDescriptor_t* sig, std::vector<std::string>& to_bytes);

0 commit comments

Comments
 (0)