mirror of
https://github.com/verilator/verilator.git
synced 2026-09-07 01:52:17 +02:00
Internals: Cleanup some vlSelf code. No functional change intended.
This commit is contained in:
+5
-3
@@ -64,10 +64,12 @@ std::ostream& operator<<(std::ostream& os, VNType rhs);
|
||||
const std::shared_ptr<const string> VSelfPointerText::s_emptyp = std::make_shared<string>("");
|
||||
const std::shared_ptr<const string> VSelfPointerText::s_thisp = std::make_shared<string>("this");
|
||||
|
||||
string VSelfPointerText::replaceThis(bool useSelfForThis, const string& text) {
|
||||
return useSelfForThis ? VString::replaceWord(text, "this", "vlSelf") : text;
|
||||
}
|
||||
|
||||
string VSelfPointerText::protect(bool useSelfForThis, bool protect) const {
|
||||
const string& sp
|
||||
= useSelfForThis ? VString::replaceWord(asString(), "this", "vlSelf") : asString();
|
||||
return VIdProtect::protectWordsIf(sp, protect);
|
||||
return VIdProtect::protectWordsIf(replaceThis(useSelfForThis, asString()), protect);
|
||||
}
|
||||
|
||||
//######################################################################
|
||||
|
||||
Reference in New Issue
Block a user