]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - c++/cursespad.cc
ncurses 5.9 - patch 20120225
[ncurses.git] / c++ / cursespad.cc
index 3685c5e5b35fc4c4977a6130ba2703c7d238d546..b5690a3e303a2dadba12ef8ce8874cc751cba816 100644 (file)
@@ -1,6 +1,6 @@
 // * this is for making emacs happy: -*-Mode: C++;-*-
 /****************************************************************************
- * Copyright (c) 1998-2005,2007 Free Software Foundation, Inc.              *
+ * Copyright (c) 1998-2008,2011 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            *
@@ -36,7 +36,7 @@
 #include <etip.h>
 #include <cursesw.h>
 
-MODULE_ID("$Id: cursespad.cc,v 1.12 2007/04/07 18:43:54 tom Exp $")
+MODULE_ID("$Id: cursespad.cc,v 1.14 2011/09/17 22:12:10 tom Exp $")
 
 NCursesPad::NCursesPad(int nlines, int ncols)
   : NCursesWindow(),
@@ -212,6 +212,7 @@ void NCursesPad::setSubWindow(NCursesWindow& sub)
 {
   if (static_cast<NCursesWindow*>(0) == viewWin)
     err_handler("Pad has no viewport");
+  assert(viewWin != 0);
   if (!viewWin->isDescendant(sub))
     THROW(new NCursesException("NCursesFramePad", E_SYSTEM_ERROR));
   viewSub = &sub;
@@ -219,6 +220,7 @@ void NCursesPad::setSubWindow(NCursesWindow& sub)
 
 void NCursesFramedPad::OnOperation(int pad_req)
 {
+  (void) pad_req;
   NCursesWindow* W = Win();
   NCursesWindow* W2 = getWindow();