millorat printWithDots() i Resource::List per a calcular el nom de fitxer mes llarg correctament
This commit is contained in:
@@ -320,11 +320,11 @@ auto getPath(const std::string& full_path) -> std::string {
|
||||
}
|
||||
|
||||
// Imprime por pantalla una linea de texto de tamaño fijo rellena con puntos
|
||||
void printWithDots(const std::string& text1, const std::string& text2, const std::string& text3) {
|
||||
void printWithDots(const std::string& text1, const std::string& text2, const std::string& text3, size_t width) {
|
||||
std::cout.setf(std::ios::left, std::ios::adjustfield);
|
||||
std::cout << text1;
|
||||
|
||||
std::cout.width(50 - text1.length() - text3.length());
|
||||
std::cout.width(static_cast<std::streamsize>(width - text1.length() - text3.length()));
|
||||
std::cout.fill('.');
|
||||
std::cout << text2;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user