Changeset 286
- Timestamp:
- Apr 23, 2011, 12:54:45 AM (14 years ago)
- Location:
- trunk/openjdk/jdk/src/windows
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/openjdk/jdk/src/windows/javavm/export/jni_md.h
r278 r286 41 41 #ifdef __cplusplus 42 42 43 inline void jsafe_cast_POD_type_only(...) {} 44 43 45 /* template for safe type casting: the generic version lets the compiler 44 46 * decide (as if no template was used); specific instantiations deal with 45 * special cases which are guaranteed to be safe */ 47 * special cases which are guaranteed to be safe. Note that it cannot be used 48 * with non-POD types as otherwise it would implicitly call the copy ctor which 49 * may have various unwanted side effects */ 46 50 template<typename TR, typename TS> 47 inline TR jsafe_cast(TS ts) { return ts; }51 inline TR jsafe_cast(TS ts) { jsafe_cast_POD_type_only(ts); return ts; } 48 52 49 53 #ifdef __EMX__ -
trunk/openjdk/jdk/src/windows/native/sun/windows/awt_PrintControl.cpp
r278 r286 136 136 137 137 JavaStringBuffer printerNameBuf(env, printerName); 138 LPTSTR lpcPrinterName = jsafe_cast<LPTSTR>(printerNameBuf);138 LPTSTR lpcPrinterName = printerNameBuf; 139 139 DASSERT(lpcPrinterName != NULL); 140 140
Note:
See TracChangeset
for help on using the changeset viewer.