mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 03:02:45 +00:00 
			
		
		
		
	 6e19ab2bbc
			
		
	
	
		6e19ab2bbc
		
	
	
	
	
		
			
			We have a new, improved string type coming up in AK (OOM aware, no null state), and while it's going to use UTF-8, the name UTF8String is a mouthful - so let's free up the String name by renaming the existing class. Making the old one have an annoying name will hopefully also help with quick adoption :^)
		
			
				
	
	
		
			39 lines
		
	
	
	
		
			873 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			39 lines
		
	
	
	
		
			873 B
		
	
	
	
		
			C++
		
	
	
	
	
	
| /*
 | |
|  * Copyright (c) 2021, Federico Guerinoni <guerinoni.federico@gmail.com>
 | |
|  *
 | |
|  * SPDX-License-Identifier: BSD-2-Clause
 | |
|  */
 | |
| 
 | |
| #include "ToDoEntries.h"
 | |
| 
 | |
| namespace HackStudio {
 | |
| 
 | |
| ToDoEntries& HackStudio::ToDoEntries::the()
 | |
| {
 | |
|     static ToDoEntries s_instance;
 | |
|     return s_instance;
 | |
| }
 | |
| 
 | |
| void ToDoEntries::set_entries(DeprecatedString const& filename, Vector<CodeComprehension::TodoEntry> const&& entries)
 | |
| {
 | |
|     m_document_to_entries.set(filename, move(entries));
 | |
|     if (on_update)
 | |
|         on_update();
 | |
| }
 | |
| 
 | |
| Vector<CodeComprehension::TodoEntry> ToDoEntries::get_entries()
 | |
| {
 | |
|     Vector<CodeComprehension::TodoEntry> ret;
 | |
|     for (auto& it : m_document_to_entries) {
 | |
|         for (auto& entry : it.value)
 | |
|             ret.append({ entry.content, it.key, entry.line, entry.column });
 | |
|     }
 | |
|     return ret;
 | |
| }
 | |
| 
 | |
| void ToDoEntries::clear_entries()
 | |
| {
 | |
|     m_document_to_entries.clear();
 | |
| }
 | |
| 
 | |
| }
 |