• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
auto syntax bugs
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

auto syntax bugs


  • Subject: auto syntax bugs
  • From: Markian Hlynka <email@hidden>
  • Date: Fri, 23 Sep 2005 15:45:21 -0600

Has anyone else seen this?

I have the following snip of code:

Enhancement::Enhancement(char* newname, enhancement_T newtype,
                         bool newstatus) throw()
{
   if (strlen(newname) > (enhancement_str_length - 1) )
      throw new Error("String is too big!\n");

   strncpy(name, newname, enhancement_str_length - 1);
   // strncpy does not null-terminate if src does not fit in dest
   name[enhancement_str_length - 1] = 0;

   type = newtype;

   status = newstatus;
}


Now, indenting on the line immediately following the throw, auto- indenting totally fails. It indents the line to start under the space following the "is". The problem seems to be the two line function header. If I change it to


Enhancement::Enhancement(char* newname, enhancement_T newtype, bool newstatus) throw()

Then everything works fine. If someone could confirm this for me, I'll file a bug. If it's just me being silly... well, then I guess I need to know that too! :-D


Thanks,

Markian


----
Early to bed and early to rise, makes a man stupid and blind in the eyes.
--Mazer Rackham



_______________________________________________ Do not post admin requests to the list. They will be ignored. Xcode-users mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Follow-Ups:
    • Re: auto syntax bugs
      • From: Andreas Grosam <email@hidden>
  • Prev by Date: Build Succeeded!
  • Next by Date: in-class initialization of fundamental types
  • Previous by thread: Build Succeeded!
  • Next by thread: Re: auto syntax bugs
  • Index(es):
    • Date
    • Thread