X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=c%2B%2B%2Fcursesp.h;h=d1eea968cedf01ec9a80ad6b9e5ee318c4198b86;hp=699ec284fcfd29906e98cab0b3c7271387bc3fec;hb=f44733b760290aa8f51c6c9e1e463254833bffcd;hpb=938680fa3bc29d2a086031a2f648dfd6cadcb51e diff --git a/c++/cursesp.h b/c++/cursesp.h index 699ec284..d1eea968 100644 --- a/c++/cursesp.h +++ b/c++/cursesp.h @@ -1,6 +1,7 @@ // * This makes emacs happy -*-Mode: C++;-*- /**************************************************************************** - * Copyright (c) 1998-2008,2012 Free Software Foundation, Inc. * + * Copyright 2019,2020 Thomas E. Dickey * + * Copyright 1998-2012,2014 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * @@ -34,7 +35,7 @@ #ifndef NCURSES_CURSESP_H_incl #define NCURSES_CURSESP_H_incl 1 -// $Id: cursesp.h,v 1.30 2012/12/29 21:50:55 tom Exp $ +// $Id: cursesp.h,v 1.33 2020/02/02 23:34:34 tom Exp $ #include @@ -131,7 +132,7 @@ public: { } - virtual ~NCursesPanel(); + virtual ~NCursesPanel() THROWS(NCursesException); // basic manipulation inline void hide() @@ -236,7 +237,8 @@ public: : NCursesPanel (nlines, ncols, begin_y, begin_x) { if (p) - set_user (const_cast(p_UserData)); + set_user (const_cast(reinterpret_cast + (p_UserData))); }; // This creates an user panel of the requested size with associated // user data pointed to by p_UserData. @@ -244,14 +246,14 @@ public: NCursesUserPanel(const T* p_UserData = STATIC_CAST(T*)(0)) : NCursesPanel() { if (p) - set_user(const_cast(p_UserData)); + set_user(const_cast(reinterpret_cast(p_UserData))); }; // This creates an user panel associated with the ::stdscr and user data // pointed to by p_UserData. - virtual ~NCursesUserPanel() {}; + virtual ~NCursesUserPanel() THROWS(NCursesException) {}; - T* UserData (void) const + T* UserData (void) { return reinterpret_cast(get_user ()); }; @@ -260,7 +262,7 @@ public: virtual void setUserData (const T* p_UserData) { if (p) - set_user (const_cast(p_UserData)); + set_user (const_cast(reinterpret_cast(p_UserData))); } // Associate the user panel with the user data pointed to by p_UserData. };