X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/0634493cdde92cbdb8d9fb95a5bebe596bb53798..b55b68608ff93cede27113663c6c0b0c82539ebc:/data/location.cc?ds=sidebyside diff --git a/data/location.cc b/data/location.cc index 3ad89b39..731c8ae8 100644 --- a/data/location.cc +++ b/data/location.cc @@ -1,7 +1,6 @@ # C++ skeleton for Bison -# Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, -# Inc. +# Copyright (C) 2002-2011 Free Software Foundation, Inc. # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -17,7 +16,7 @@ # along with this program. If not, see . m4_pushdef([b4_copyright_years], - [2002, 2003, 2004, 2005, 2006, 2007, 2008]) + [2002-2011]) # We do want M4 expansion after # for CPP macros. m4_changecom() @@ -121,10 +120,11 @@ b4_copyright([Positions for Bison parsers in C++])[ inline bool operator== (const position& pos1, const position& pos2) { - return - (pos1.filename == pos2.filename - || pos1.filename && pos2.filename && *pos1.filename == *pos2.filename) - && pos1.line == pos2.line && pos1.column == pos2.column; + return (pos1.line == pos2.line + && pos1.column == pos2.column + && (pos1.filename == pos2.filename + || (pos1.filename && pos2.filename + && *pos1.filename == *pos2.filename))); } /// Compare two position objects.