Reviews and improves **names** in code — variables, functions, classes, modules, parameters — for clarity, intent, and consistency with language/team conventions. Triggers when asked to review names, rename things, improve code readability, clean up confusing code, or when examining code with generic/vague names like "data", "info", "manager", "temp", "util". Does NOT trigger for general code review unrelated to naming, architecture design, debugging, or performance optimization. Identifies naming anti-patterns (generic names, misleading names, type-encoding, abbreviations), suggests role-based names that reveal intent, checks consistency with project/domain vocabulary, and flags misalignment with language culture.
91
90%
Does it follow best practices?
Impact
94%
1.05xAverage score across 5 eval scenarios
Passed
No known issues
A C++ networking library mostly follows a Google-like style, but a newly added header mixes several historical conventions. The team wants a naming-focused review that respects the nearby project style rather than imposing a different style guide.
Review the header and provide a revised version with consistent names. Call out any names that are especially risky because of standard-reserved forms or public API compatibility.
Produce cpp_naming_review.md with old/new names and rationale. Produce connection_pool.hpp with revised declarations only; implementation is not required.
=============== FILE: ConnectionPool.hpp ===============
#pragma once
#include <string>
#include <vector>
namespace NetLib {
#define maxConn 32
class connection_pool {
public:
connection_pool();
std::string GetName() const;
void SetName(const std::string& strName);
bool Active() const;
void DoWork(int tmp);
private:
std::string _name;
int m_intCount;
std::vector<std::string> data;
};
struct packet_info {
int i;
char* pszName;
};
} // namespace NetLibNearby project style uses lowercase netlib namespaces, PascalCase types, snake_case functions and variables, kPascalCase constants, and trailing underscores for private members.