add spaces for PICout operators

This commit is contained in:
2025-02-27 21:26:29 +03:00
parent 8e96750046
commit 4340f5444d
5 changed files with 15 additions and 0 deletions

View File

@@ -333,12 +333,15 @@ inline PIMathVectorT<Size, Type> operator*(const Type & x, const PIMathVectorT<S
template<uint Size, typename Type>
inline PICout operator<<(PICout s, const PIMathVectorT<Size, Type> & v) {
s.space();
s.saveAndSetControls(0);
s << "Vector{";
PIMV_FOR {
s << v[i];
if (i < Size - 1) s << ", ";
}
s << "}";
s.restoreControls();
return s;
}
@@ -611,12 +614,15 @@ inline std::ostream & operator<<(std::ostream & s, const PIMathVector<Type> & v)
template<typename Type>
inline PICout operator<<(PICout s, const PIMathVector<Type> & v) {
s.space();
s.saveAndSetControls(0);
s << "Vector{";
for (uint i = 0; i < v.size(); ++i) {
s << v[i];
if (i < v.size() - 1) s << ", ";
}
s << "}";
s.restoreControls();
return s;
}