Веб-сайт самохостера Lotigara

summaryrefslogtreecommitdiff
path: root/source/core/StarSmallVector.hpp
diff options
context:
space:
mode:
authorKae <80987908+Novaenia@users.noreply.github.com>2023-06-27 20:23:44 +1000
committerKae <80987908+Novaenia@users.noreply.github.com>2023-06-27 20:23:44 +1000
commit332983c97b7a729c4dc5f19aa9ee4a22c420f7d8 (patch)
treefd9c441b796b522bdd5c7f8fbd32f51b8eff2a28 /source/core/StarSmallVector.hpp
parent14b9689b6d4f4ad5276c88130dc6e449bedc0709 (diff)
The Formatting String Catastrophe
Diffstat (limited to 'source/core/StarSmallVector.hpp')
-rw-r--r--source/core/StarSmallVector.hpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/core/StarSmallVector.hpp b/source/core/StarSmallVector.hpp
index 38d32a3..2a77a3d 100644
--- a/source/core/StarSmallVector.hpp
+++ b/source/core/StarSmallVector.hpp
@@ -209,7 +209,7 @@ void SmallVector<Element, MaxStackSize>::reserve(size_t newCapacity) {
newCapacity = max(oldCapacity * 2, newCapacity);
auto newMem = (Element*)Star::malloc(newCapacity * sizeof(Element));
if (!newMem)
- throw MemoryException::format("Could not set new SmallVector capacity %s\n", newCapacity);
+ throw MemoryException::format("Could not set new SmallVector capacity {}\n", newCapacity);
size_t size = m_end - m_begin;
auto oldMem = m_begin;
@@ -238,14 +238,14 @@ void SmallVector<Element, MaxStackSize>::reserve(size_t newCapacity) {
template <typename Element, size_t MaxStackSize>
auto SmallVector<Element, MaxStackSize>::at(size_t i) -> reference {
if (i >= size())
- throw OutOfRangeException::format("out of range in SmallVector::at(%s)", i);
+ throw OutOfRangeException::format("out of range in SmallVector::at({})", i);
return m_begin[i];
}
template <typename Element, size_t MaxStackSize>
auto SmallVector<Element, MaxStackSize>::at(size_t i) const -> const_reference {
if (i >= size())
- throw OutOfRangeException::format("out of range in SmallVector::at(%s)", i);
+ throw OutOfRangeException::format("out of range in SmallVector::at({})", i);
return m_begin[i];
}