买了小米 15 Ultra 欧版,发现即使刷入 xiaomi.eu rom,安装了小米钱包也无法调起 NFC 门卡模拟,于是索性做了个模块,不保证别的型号手机能用。
实现:挂载 CN 的小米智能卡,并替换掉 com.android.nfc 包,这样所有 NFC 模拟功能都能正常使用,包括双击电源键调起选卡菜单。
配合 https://t.me/nullptr_dev/106 实现快速切换门卡模拟和 Google Pay
Real Nullptr

Nullptr's personal channel
Support me:
https://github.com/sponsors/Dr-TSNG
https://afdian.com/a/dr-tsng
TRC20:TYG2MCMcXWsko9DZkVXjX3P1Xv7dhNAarx
Support me:
https://github.com/sponsors/Dr-TSNG
https://afdian.com/a/dr-tsng
TRC20:TYG2MCMcXWsko9DZkVXjX3P1Xv7dhNAarx
12,387 订阅者
6 张照片
38 个视频
最后更新于 23.03.2025 22:36
Exploring the Concept of Nullptr in Programming
In the realm of programming, particularly in C++, the concept of null pointers has evolved considerably over the years. One significant development in this evolution is the introduction of the 'nullptr' keyword in C++11. 'nullptr' provides a type-safe null pointer constant that enhances code clarity and reduces the risks associated with using null pointers. Prior to 'nullptr', the traditional approach involved using 'NULL', which could often lead to ambiguity in function overloading, as 'NULL' is typically defined as zero. This misinterpretation could result in subtle bugs, making the introduction of 'nullptr' a welcomed change. Throughout this article, we will explore the intricacies of 'nullptr', its advantages over previous null pointer representations, and its implications for modern programming practices. Additionally, we will address common questions that arise regarding the usage of 'nullptr', aiming to clarify its role in enhancing the safety and reliability of C++ code.
What exactly is 'nullptr' and how does it differ from 'NULL'?
'nullptr' is a keyword introduced in C++11 that represents a null pointer constant. Unlike 'NULL', which is typically defined as zero and can be ambiguous in terms of type, 'nullptr' has its own type, specifically 'std::nullptr_t'. This clear distinction allows the compiler to differentiate between pointer types easily, thereby improving type safety and reducing errors.
The use of 'nullptr' ensures that when developers assign it to a pointer, they are explicitly declaring that the pointer points to nothing. This clarity helps avoid common pitfalls associated with null pointers, such as accidentally calling a method on a null object or passing a null pointer to a function that expects a valid pointer.
When should developers use 'nullptr' instead of 'NULL'?
Developers should opt for 'nullptr' whenever they are writing code in C++11 or later versions. Its introduction was specifically aimed at resolving issues related to type safety that were prevalent with 'NULL'. Using 'nullptr' enhances code readability and maintenance, allowing others who may read the code later to understand the intention behind the null pointer more clearly.
Additionally, in situations where function overloading is involved, using 'nullptr' helps the compiler to resolve which function to call more effectively. This is particularly beneficial in complex codebases where ambiguity can introduce bugs that are difficult to diagnose.
Can 'nullptr' be used in conditions and loops like regular pointers?
Yes, 'nullptr' can be used in conditional statements and loops just like any regular pointer. When evaluated in a boolean context, 'nullptr' is considered false, while any non-null pointer is evaluated as true. This allows developers to use 'nullptr' seamlessly in control structures such as 'if' statements or 'while' loops, maintaining logical consistency.
For example, a common idiom in C++ to check if a pointer is valid is to use an if statement: 'if (myPointer != nullptr) {...}'. This ensures that actions are only taken when the pointer is not null, preventing potential dereferencing of a null pointer.
Are there any performance implications when using 'nullptr'?
From a performance perspective, using 'nullptr' has no significant overhead compared to 'NULL'. The introduction of 'nullptr' was primarily a design choice to improve code safety and clarity rather than a performance optimization. The underlying representation of 'nullptr' at runtime is generally equivalent to that of null pointers in previous standards.
Therefore, developers can use 'nullptr' confidently without worrying about negatively impacting performance, while benefiting from enhanced code quality and maintainability.
How does 'nullptr' improve safety in modern C++ programming?
'nullptr' improves safety by preventing the misinterpretation of null pointer values. With the risk of mistakenly using an integral value of zero as a pointer, 'nullptr' establishes a clear distinction which helps the compiler catch potential errors during compile time. This aspect is particularly crucial in large codebases where the risk of encountering such errors increases as complexity grows.
Moreover, 'nullptr' aids in mitigating issues related to function overloads by providing a more explicit way for the compiler to determine which function variant should be invoked, thereby enhancing the robustness of the code and decreasing the likelihood of runtime errors.
Real Nullptr Telegram 频道
Real Nullptr is a personal channel created by nullptr_dev, aimed at sharing valuable insights, knowledge, and updates with the community. The channel serves as a platform for discussions, collaborations, and learning opportunities. With a focus on technology, innovation, and creativity, Real Nullptr offers a diverse range of content, including articles, tutorials, news, and resources related to software development, coding, and programming. Whether you are a beginner looking to explore the world of coding or an experienced developer seeking to stay updated on the latest trends, Real Nullptr has something for everyone. Join the channel to connect with like-minded individuals, expand your skill set, and stay informed about the ever-evolving tech landscape. Don't miss out on the chance to be part of this dynamic community dedicated to learning and growth. Join Real Nullptr today and start your journey towards becoming a tech-savvy individual!