Author: Palamarchuk Arseniy, ITMO, M3105
Int-Maxer is a Visual Studio Code extension that automatically upgrades all integer variable types in your C++ files to their largest counterparts. For example, it transforms int8_t into int64_t and uint16_t into uint64_t. This tool is perfect for developers who need to ensure maximum data capacity for integer types.
- Automatically replace all occurrences of smaller integer types with their largest equivalents:
int8_t→int64_tuint8_t→uint64_tint16_t→int64_tuint16_t→uint64_tint32_t→int64_tuint32_t→uint64_t
- Works seamlessly with C++ files.
- Adds a button in the status bar to activate the transformation with a single click.
- Visual Studio Code version 1.95.0 or higher.
- Node.js installed for development or debugging purposes.
- Clone the repository:
git clone https://github.com/your-repo/int-maxer.git cd int-maxer - Install dependencies:
npm install
- Compile the extension:
npm run compile
- Open the project folder in Visual Studio Code.
- Press
F5to launch the extension in a new Extension Development Host window.
- Open a C++ file in Visual Studio Code.
- Trigger the extension using one of the following methods:
- Open the Command Palette (
Ctrl+Shift+P), typeMaximize Variable Types (C++), and pressEnter. - Click the Maximize Types button in the status bar (bottom-right corner of the editor).
- Open the Command Palette (
- All eligible types in the file will be replaced with their larger equivalents.
src/: Contains the TypeScript source code for the extension.out/: The compiled JavaScript code generated by TypeScript.package.json: Configuration and metadata for the extension.
- Compile TypeScript:
npm run compile
- Watch for TypeScript changes:
npm run watch
- Open the project in Visual Studio Code.
- Go to the Run and Debug panel.
- Start debugging with the Launch Extension configuration.
- Works only with standard fixed-width integer types (
int8_t,uint8_t, etc.). - Does not handle custom integer typedefs or unusual naming conventions.