1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 |
- #ifndef BASE_ANDROID_JNI_INT_WRAPPER_H_
- #define BASE_ANDROID_JNI_INT_WRAPPER_H_
- #ifdef NDEBUG
- typedef jint JniIntWrapper;
- inline jint as_jint(JniIntWrapper wrapper) {
- return wrapper;
- }
- #else
- class JniIntWrapper {
- public:
- JniIntWrapper() : i_(0) {}
- JniIntWrapper(int i) : i_(i) {}
- JniIntWrapper(const JniIntWrapper& ji) : i_(ji.i_) {}
- template <class T> JniIntWrapper(const T& t) : i_(t) {}
- jint as_jint() const { return i_; }
- private:
-
-
-
-
-
-
-
-
- JniIntWrapper(long);
- jint i_;
- };
- inline jint as_jint(const JniIntWrapper& wrapper) {
- return wrapper.as_jint();
- }
- #endif
- #endif
|