File tree Expand file tree Collapse file tree 2 files changed +3
-0
lines changed
Expand file tree Collapse file tree 2 files changed +3
-0
lines changed Original file line number Diff line number Diff line change @@ -183,6 +183,7 @@ class SvdItem : public SvdElement {
183183 std::string GetHierarchicalNameResulting ();
184184 std::string TryGetHeaderStructName (SvdItem *item);
185185 const std::string& GetPeripheralName ();
186+ bool SetProtection (SvdTypes::ProtectionType protection) { m_protection = protection; return true ; }
186187 SvdTypes::ProtectionType GetProtection () { return m_protection; }
187188 std::string GetDeriveName ();
188189 SvdItem* GetParent () { return m_parent; }
Original file line number Diff line number Diff line change @@ -895,13 +895,15 @@ bool SvdItem::CopyItem(SvdItem *from)
895895 const auto lineNo = GetLineNumber ();
896896 const auto bitWidth = GetBitWidth ();
897897 const auto dimElementIndex = GetDimElementIndex ();
898+ const auto protection = GetProtection ();
898899
899900 if (name == " " ) { SetName (from->GetName ()); }
900901 if (dispName == " " ) { SetDisplayName (from->GetDisplayName ()); }
901902 if (descr == " " ) { SetDescription (from->GetDescription ()); }
902903 if (lineNo == -1 ) { SetLineNumber (from->GetLineNumber ()); }
903904 if (bitWidth == (int32_t )SvdItem::VALUE32_NOT_INIT){ SetBitWidth (from->GetBitWidth ()); }
904905 if (dimElementIndex == SvdItem::VALUE32_NOT_INIT) { SetDimElementIndex (from->GetDimElementIndex ()); }
906+ if (protection == SvdTypes::ProtectionType::UNDEF) { SetProtection (from->GetProtection ()); }
905907
906908 string tag = " Copied " ;
907909 const string &oldTag = GetTag ();
You can’t perform that action at this time.
0 commit comments