]> git.ipfire.org Git - thirdparty/squid.git/blobdiff - src/acl/NoteData.cc
Source Format Enforcement (#1234)
[thirdparty/squid.git] / src / acl / NoteData.cc
index e1cdf0210487cd037836b6486bdbc3894095897e..c8f91f17199f845cd403219a32f30590677351b6 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 1996-2018 The Squid Software Foundation and contributors
+ * Copyright (C) 1996-2023 The Squid Software Foundation and contributors
  *
  * Squid software is distributed under GPLv2+ license and includes
  * contributions from numerous individuals and organizations.
@@ -12,7 +12,7 @@
 #include "acl/NoteData.h"
 #include "acl/StringData.h"
 #include "ConfigParser.h"
-#include "Debug.h"
+#include "debug/Stream.h"
 #include "sbuf/StringConvert.h"
 #include "wordlist.h"
 
@@ -47,9 +47,7 @@ ACLNoteData::dump() const
 void
 ACLNoteData::parse()
 {
-    char* t = ConfigParser::strtokFile();
-    assert (t != NULL);
-    name = t;
+    ConfigParser::SetAclKey(name, "annotation name");
     values->parse();
 }
 
@@ -59,13 +57,3 @@ ACLNoteData::empty() const
     return name.isEmpty();
 }
 
-ACLData<NotePairs::Entry *> *
-ACLNoteData::clone() const
-{
-    ACLNoteData * result = new ACLNoteData;
-    result->values = dynamic_cast<ACLStringData*>(values->clone());
-    assert(result->values);
-    result->name = name;
-    return result;
-}
-