From 71198a0b54d9f36607f0a59f3adafd9347f7c1e8 Mon Sep 17 00:00:00 2001 From: Matt Pharr Date: Mon, 4 Jun 2012 08:53:43 -0700 Subject: [PATCH] Don't indent too much in errors/warnings if the filename is long. --- util.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/util.cpp b/util.cpp index 3c0de598..a5cf5a92 100644 --- a/util.cpp +++ b/util.cpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2010-2011, Intel Corporation + Copyright (c) 2010-2012, Intel Corporation All rights reserved. Redistribution and use in source and binary forms, with or without @@ -349,6 +349,8 @@ lPrint(const char *type, bool isError, SourcePos p, const char *fmt, } indent = lFindIndent(3, formattedBuf); } + // Don't indent too much with long filenames + indent = std::min(indent, 8); // Now that we've done all that work, see if we've already printed the // exact same error message. If so, return, so we don't redundantly