HexEdit/HexEditView.cpp
BOOL CHexEditView::is_last_change()
{
#ifdef _DEBUG
	{
		// Why can't the debugger look into STL containers?
		int undo_size = undo_.size();
		for (std::vector<view_undo>::reverse_iterator rr = undo_.rbegin(); rr != undo_.rend(); ++rr)
		{
			view_undo undo_elt = *rr;
		}
	}
#endif

	// Check if the last thing on undo stack is a change
	for (std::vector<view_undo>::reverse_iterator pp = undo_.rbegin(); pp != undo_.rend(); ++pp)
	{
		if (pp->utype == undo_change)
			return TRUE;         // Top undo op is a change

		if (!pp->previous_too)
			break;               // End of top undo operation
	}
	return FALSE;
}
// Check if the top "operation" on the undo stack is a file change.  Note that an operation
// consists of all elts on the stack back until one without the previous_too flag set.

Check if the top "operation" on the undo stack is a file change.  Note that an operation
consists of all elts on the stack back until one without the previous_too flag set.
Check if the top " operation " on the undo stack is a file change . Note that an operation consists of all elts on the stack back until one without the previous_too flag set .
BOOL CHexEditView::is_last_change()
{
#ifdef _DEBUG
	{
		int undo_size = undo_.size();
		for (std::vector<view_undo>::reverse_iterator rr = undo_.rbegin(); rr != undo_.rend(); ++rr)
		{
			view_undo undo_elt = *rr;
		}
	}
#endif
	for (std::vector<view_undo>::reverse_iterator pp = undo_.rbegin(); pp != undo_.rend(); ++pp)
	{
		if (pp->utype == undo_change)
			return TRUE;         
		if (!pp->previous_too)
			break;               
	}
	return FALSE;
}
BOOL CHexEditView :: is_last_change ( ) { #ifdef _DEBUG { int undo_size = undo_ . size ( ) ; for ( std :: vector < view_undo > :: reverse_iterator rr = undo_ . rbegin ( ) ; rr != undo_ . rend ( ) ; ++ rr ) { view_undo undo_elt = * rr ; } } #endif for ( std :: vector < view_undo > :: reverse_iterator pp = undo_ . rbegin ( ) ; pp != undo_ . rend ( ) ; ++ pp ) { if ( pp -> utype == undo_change ) return TRUE ; if ( ! pp -> previous_too ) break ; } return FALSE ; }
Check if the top "operation" on the undo stack is a file change.
Check if the top " operation " on the undo stack is a file change .
// Why can't the debugger look into STL containers?
 // Check if the last thing on undo stack is a change
 // Top undo op is a change
 // End of top undo operation
